Ticket #978: msie_html_fix.patch
File msie_html_fix.patch, 1.2 KB (added by , 15 years ago) |
---|
-
jquery.js
614 614 */ 615 615 wrap: function() { 616 616 // The elements to wrap the target around 617 var a = jQuery.clean(arguments );617 var a = jQuery.clean(arguments, this[0].ownerDocument); 618 618 619 619 // Wrap each of the matched elements individually 620 620 return this.each(function(){ … … 1122 1122 */ 1123 1123 domManip: function(args, table, dir, fn){ 1124 1124 var clone = this.length > 1; 1125 var a = jQuery.clean(args );1125 var a = jQuery.clean(args, this[0].ownerDocument); 1126 1126 if ( dir < 0 ) 1127 1127 a.reverse(); 1128 1128 … … 1440 1440 return ret; 1441 1441 }, 1442 1442 1443 clean: function(a ) {1443 clean: function(a, doc) { 1444 1444 var r = []; 1445 var doc = doc; 1445 1446 1447 if ( doc == undefined ) 1448 doc = document; 1449 1446 1450 jQuery.each( a, function(i,arg){ 1447 1451 if ( !arg ) return; 1448 1452 … … 1452 1456 // Convert html string into DOM nodes 1453 1457 if ( typeof arg == "string" ) { 1454 1458 // Trim whitespace, otherwise indexOf won't work as expected 1455 var s = jQuery.trim(arg), div = doc ument.createElement("div"), tb = [];1459 var s = jQuery.trim(arg), div = doc.createElement("div"), tb = []; 1456 1460 1457 1461 var wrap = 1458 1462 // option or optgroup