noop: function() {},
- // Evalulates a script in a global context
+ // Evaluates a script in a global context
globalEval: function( data ) {
if ( data && rnotwhite.test(data) ) {
// Inspired by code by Andrea Giammarchi
classNames = value.split( rspace );
while ( (className = classNames[ i++ ]) ) {
- // check each className given, space seperated list
+ // check each className given, space separated list
state = isBool ? state : !self.hasClass( className );
self[ state ? "addClass" : "removeClass" ]( className );
}
var option = options[ i ];
if ( option.selected ) {
- // Get the specifc value for the option
+ // Get the specific value for the option
value = jQuery(option).val();
// We don't need an array for one selects
baseHasDuplicate = true;
// Here we check if the JavaScript engine is using some sort of
-// optimization where it does not always call our comparision
+// optimization where it does not always call our comparison
// function. If that is the case, discard the hasDuplicate value.
// Thus far that includes Google Chrome.
[0, 0].sort(function(){
};
}
-// Utility function for retreiving the text value of an array of DOM nodes
+// Utility function for retrieving the text value of an array of DOM nodes
function getText( elems ) {
var ret = "", elem;
if ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {
// IE copies events bound via attachEvent when
// using cloneNode. Calling detachEvent on the
- // clone will also remove the events from the orignal
+ // clone will also remove the events from the original.
// In order to get around this, we use innerHTML.
// Unfortunately, this means some modifications to
// attributes in IE that are actually only stored
// as properties will not be copied (such as the
- // the name attribute on an input).
+ // name attribute on an input).
var html = this.outerHTML, ownerDocument = this.ownerDocument;
if ( !html ) {
var div = ownerDocument.createElement("div");
jQuery.extend({
get: function( url, data, callback, type ) {
- // shift arguments if data argument was omited
+ // shift arguments if data argument was omitted
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
},
post: function( url, data, callback, type ) {
- // shift arguments if data argument was omited
+ // shift arguments if data argument was omitted
if ( jQuery.isFunction( data ) ) {
type = type || callback;
callback = data;
// Create the request object; Microsoft failed to properly
// implement the XMLHttpRequest in IE7 (can't request local files),
// so we use the ActiveXObject when it is available
- // This function can be overriden by calling jQuery.ajaxSetup
+ // This function can be overridden by calling jQuery.ajaxSetup
xhr: window.XMLHttpRequest && (window.location.protocol !== "file:" || !window.ActiveXObject) ?
function() {
return new window.XMLHttpRequest();
jQuery.event.trigger( "ajaxStop" );
}
- // close opended socket
+ // close opened socket
xhr.abort();
return false;
}
complete();
}
- // firefox 1.5 doesn't fire statechange for sync requests
+ // Firefox 1.5 doesn't fire statechange for sync requests
if ( !s.async ) {
onreadystatechange();
}
val -= parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
}
- // at this point, extra isnt border nor margin, so remove border
+ // at this point, extra isn't border nor margin, so remove border
if ( extra !== "margin" ) {
val -= parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
}
} else {
- // at this point, extra isnt content, so add padding
+ // at this point, extra isn't content, so add padding
val += parseFloat( curCSS( elem, "padding" + cssExpand[ i ] ) ) || 0;
- // at this point, extra isnt content nor padding, so add border
+ // at this point, extra isn't content nor padding, so add border
if ( extra !== "padding" ) {
val += parseFloat( curCSS( elem, "border" + cssExpand[ i ] + "Width" ) ) || 0;
}