Posted By

wdeer on 12/07/10


Tagged

jquery


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

virendrakryadav


Jquery No Conflict


 / Published in: jQuery
 

  1. <script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'></script>
  2. <script type='text/javascript'>
  3. jQuery.noConflict();
  4. (function($) {
  5. $(function() {
  6.  
  7. });
  8. })(jQuery);
  9. </script>

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: digitalclubb on December 14, 2010

A nice way I like to do it is as follows:

var j = jQuery.noConflict();

then for selectors you would go:

j("div p").hide();

Posted By: Some0ne on January 15, 2011

No conflict is now standard in jQuery so you just need to replace $ with jQuery

IE:

jQuery(document).ready(function() {

$('a#top').click(function(){
    $('html, body').animate({scrollTop:0}, 'slow');
    return false;
});

});

You need to login to post a comment.