Created
September 17, 2013 04:29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.noConflict(); | |
jQuery( document ).ready(function( $ ) { | |
// Code that uses jQuery's $ can follow here. | |
}); | |
// Code that uses other library's $ can follow here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.noConflict(); | |
(function( $ ) { | |
$(function() { | |
// More code using $ as alias to jQuery | |
}); | |
})(jQuery); | |
// Other code using $ as an alias to the other library |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var j = jQuery.noConflict(); | |
// Do something with jQuery | |
j( "div p" ).hide(); | |
// Do something with another library's $() | |
$( "content" ).style.display = "none"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment