posts

posts » article » using jquery and mootools together

using jquery and mootools together


28 December 2011 , 6:41 pm

poster-using jquery and mootools together

Using jquery and mootools together is very simple and easy.the problem occured to me when i first itme used the jquery and mootools together.i tried some silly things to make it work,but some times mootools stops and sometimes jquery.then i read and article on conflict between jquery and mootools.

The fix was very simple which i m going to share with you.the steps are below:

Declare jquery library and its plugins at the top right after the head tag.

do not use jquery symbol $ instead use jQuery.but before that use jquery noConflict method.it like below:

SAMPLE CODE JQuery NO Conflict:

 

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery.ticker.js"></script>
<script type="text/javascript">
 //no conflict jquery
  jQuery.noConflict();
     jQuery(document).ready(function () {
         jQuery('#js-news').ticker();
     })(jQuery);//using jQuery instead of $ symbol
 </script>    

like the above sample code write all jquery code first.after writting all the jquery code then include mootools library and it mootools scripts.thats how it works.

That how we sepate jquery methods and mootools methods and still use them together.



Postedby:admin

Posted Under:posts    Category:article

SHARE POST:


SHARE







FACEBOOK COMMENTS




COMMENTS

Write Your Thoughts


Name:

Email:

Comment:




LOGIN


Email:
Password:

Not Registered yet? Sign Up here..


FIND US on FACEBOOK

DESIGN AEON

Unable to open template http://skynetitsolutions.com/rss2htm/sample-template1.html with error HTTP ERROR: 301, exiting

Blog Archive

Latest News

Unable to open template http://skynetitsolutions.com/rss2htm/sample-template.html with error HTTP ERROR: 301, exiting

Latest News