X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjquery%2Fjquery.js;h=12b342cb8979b9eef9df0138b0f6e034054df908;hb=7b2c84ddbe004ed4ab2ee3982af40b7275d7dfde;hp=2259ece4ada38c3c653a877d9db8bf99b3257df9;hpb=1ffa984e0d27a832245920d045b88c94c00a998c;p=jquery.git
diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js
index 2259ece..12b342c 100644
--- a/src/jquery/jquery.js
+++ b/src/jquery/jquery.js
@@ -95,7 +95,10 @@ if ( typeof $ != "undefined" )
* @result [
two
]
*
* @example $("").appendTo("#body")
- * @desc Creates a div element (and all of its contents) dynamically, and appends it to the element with the ID of body.
+ * @desc Creates a div element (and all of its contents) dynamically,
+ * and appends it to the element with the ID of body. Internally, an
+ * element is created and it's innerHTML property set to the given markup.
+ * It is therefore both quite flexible and limited.
*
* @name $
* @param String expr An expression to search with, or a string of HTML to create on the fly.
@@ -645,7 +648,7 @@ jQuery.fn = jQuery.prototype = {
// Insert it before the element to be wrapped
this.parentNode.insertBefore( b, this );
- // Find he deepest point in the wrap structure
+ // Find the deepest point in the wrap structure
while ( b.firstChild )
b = b.firstChild;
@@ -1381,10 +1384,6 @@ jQuery.extend({
o.className += ( o.className ? " " : "" ) + c;
},
remove: function(o,c){
- /*
- o.className = !c ? "" :
- o.className.replace(
- new RegExp("(^|\\s*\\b[^-])"+c+"($|\\b(?=[^-]))", "g"), "");*/
if( !c ) {
o.className = "";
} else {
@@ -1493,7 +1492,9 @@ jQuery.extend({
var r = [];
for ( var i = 0; i < a.length; i++ ) {
if ( a[i].constructor == String ) {
-
+ // trim whitespace, otherwise indexOf won't work as expected
+ a[i] = jQuery.trim(a[i]);
+
var table = "";
if ( !a[i].indexOf("