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
| /* ! | |
| * Partial jQuery, extracted from | |
| * jQuery JavaScript Library v1.7.2 | |
| */ | |
| (function( window, undefined ) { | |
| // Use the correct document accordingly with window argument (sandbox) | |
| var document = window.document, | |
| navigator = window.navigator; | |
| ... skip .... |
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
| var jQuery = (function() { | |
| // Define a local copy of jQuery | |
| var jQuery = function( selector, context ) { | |
| // The jQuery object is actually just the init constructor 'enhanced' | |
| return new jQuery.fn.init( selector, context ); | |
| }, | |
| // A central reference to the root jQuery(document) | |
| rootjQuery; | |
| jQuery.fn = jQuery.prototype = { |
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
| // No chaining | |
| $("#menu").fadeIn('fast'); | |
| $("#menu").addClass(".active"); | |
| $("#menu").css('marginRight', '10px'); |
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
| // vs. with chaining | |
| $("#menu").fadeIn('fast').addClass("active").css('marginRight', '10px'); | |
| // or | |
| $("#menu").fadeIn('fast') | |
| .addClass("active") | |
| .css('marginRight', '10px'); |
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
| function setup(items) | |
| { | |
| var divs = document.getElementsByTagName("div"); | |
| var images = document.getElementsByTagName("image"); | |
| var button = document.getElementsById("save-btn"); | |
| for (var i = 0; i < items.length; i++) { | |
| process(items[i], div[i]); | |
| } |
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
| function setup(items) | |
| { | |
| var doc = document; | |
| var divs = doc.getElementsByTagName("div"); | |
| var images = doc.getElementsByTagName("image"); | |
| var button = doc.getElementsById("save-btn"); | |
| for (var i = 0; i < items.length; i++) { | |
| process(items[i], div[i]); | |
| } |
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
| //... skipped ... | |
| ready: function( fn ) { | |
| // Attach the listeners | |
| jQuery.bindReady(); | |
| // Add the callback | |
| readyList.add( fn ); | |
| return this; | |
| }, |
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
| // HANDLE: $(function) | |
| // Shortcut for document ready | |
| } else if ( jQuery.isFunction( selector ) ) { | |
| return rootjQuery.ready( selector ); | |
| } |
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
| init: function( selector, context, rootjQuery ) { | |
| var match, elem, ret, doc; | |
| // Handle $(""), $(null), or $(undefined) | |
| if ( !selector ) { | |
| return this; | |
| } | |
| // Handle $(DOMElement) | |
| if ( selector.nodeType ) { |
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
| ready: function( fn ) { | |
| // Attach the listeners | |
| jQuery.bindReady(); | |
| // Add the callback | |
| readyList.add( fn ); | |
| return this; | |
| } |
OlderNewer