Created
February 5, 2014 22:54
-
-
Save Angelfirenze/8835043 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
/** | |
* $(document).ready() | |
**/ | |
$(document).ready(function() { | |
// Handler for .ready() called. | |
}); | |
$(function() { | |
// Handler for .ready() called. | |
}); | |
jQuery(document).ready(function($) { | |
// Code using $ as usual goes here. | |
}); | |
/** | |
* $.noConflict | |
**/ | |
jQuery.noConflict(); | |
jQuery("div p").hide(); // Do something with jQuery | |
$("content").style.display = "none"; // Do something with another library's $() | |
jQuery.noConflict(); (function($) { $(function() { | |
// More code using $ as alias to jQuery | |
});})(jQuery); | |
var j = jQuery.noConflict(); | |
j( "div p" ).hide(); // Do something with jQuery | |
$( "content" ).style.display = "none"; | |
var dom = {}; | |
dom.query = jQuery.noConflict( true ); | |
dom.query( "div p" ).hide(); // Do something with the new jQuery | |
$( "content" ).style.display = "none"; // Do something with another library's $() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment