Removed (hopefully) all references to $ within the jQuery code itself
[jquery.git] / src / jquery / jquery.js
index 2259ece..12b342c 100644 (file)
@@ -95,7 +95,10 @@ if ( typeof $ != "undefined" )
  * @result [ <p>two</p> ]\r
  *\r
  * @example $("<div><p>Hello</p></div>").appendTo("#body")\r
- * @desc Creates a div element (and all of its contents) dynamically, and appends it to the element with the ID of body.\r
+ * @desc Creates a div element (and all of its contents) dynamically, \r
+ * and appends it to the element with the ID of body. Internally, an\r
+ * element is created and it's innerHTML property set to the given markup.\r
+ * It is therefore both quite flexible and limited. 
  *\r
  * @name $\r
  * @param String expr An expression to search with, or a string of HTML to create on the fly.\r
@@ -645,7 +648,7 @@ jQuery.fn = jQuery.prototype = {
                        // Insert it before the element to be wrapped\r
                        this.parentNode.insertBefore( b, this );\r
 \r
-                       // Find he deepest point in the wrap structure\r
+                       // Find the deepest point in the wrap structure\r
                        while ( b.firstChild )\r
                                b = b.firstChild;\r
 \r
@@ -1381,10 +1384,6 @@ jQuery.extend({
                        o.className += ( o.className ? " " : "" ) + c;\r
                },\r
                remove: function(o,c){\r
-                       /*\r
-                       o.className = !c ? "" :\r
-                               o.className.replace(\r
-                                       new RegExp("(^|\\s*\\b[^-])"+c+"($|\\b(?=[^-]))", "g"), "");*/\r
                        if( !c ) {\r
                                o.className = "";\r
                        } else {\r
@@ -1493,7 +1492,9 @@ jQuery.extend({
                var r = [];\r
                for ( var i = 0; i < a.length; i++ ) {\r
                        if ( a[i].constructor == String ) {\r
-\r
+                               // trim whitespace, otherwise indexOf won't work as expected\r
+                               a[i] = jQuery.trim(a[i]);\r
+                               \r
                                var table = "";\r
 \r
                                if ( !a[i].indexOf("<thead") || !a[i].indexOf("<tbody") ) {\r
@@ -1832,7 +1833,7 @@ jQuery.extend({
                if ( fix[name] ) {\r
                        if ( value != undefined ) elem[fix[name]] = value;\r
                        return elem[fix[name]];\r
-               } else if( value == undefined && $.browser.msie && elem.nodeName && elem.nodeName.toUpperCase() == 'FORM' && (name == 'action' || name == 'method') ) {\r
+               } else if( value == undefined && jQuery.browser.msie && elem.nodeName && elem.nodeName.toUpperCase() == 'FORM' && (name == 'action' || name == 'method') ) {\r
                        return elem.getAttributeNode(name).nodeValue;\r
                } else if ( elem.getAttribute != undefined ) {\r
                        if ( value != undefined ) elem.setAttribute( name, value );\r