X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fmanipulation.js;h=ed049de7cba1e8339e4789acba8950842c1f1121;hb=98c7248518f9a2082ccf50240b5ab44bf98d7b5e;hp=c2c0ff2a70bce0fc6fdc2689d59089504ee5d8a8;hpb=7c04a64016c1f295dfdf4e731f693f8400a987bc;p=jquery.git diff --git a/src/manipulation.js b/src/manipulation.js index c2c0ff2..ed049de 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -1,40 +1,73 @@ -// exclude the following css properties to add px -var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i, - // cache defaultView - defaultView = document.defaultView || {}; +var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, + rleadingWhitespace = /^\s+/, + rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g, + rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i, + rtagName = /<([\w:]+)/, + rtbody = /"; + }, + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
", "
" ], + thead: [ 1, "", "
" ], + tr: [ 2, "", "
" ], + td: [ 3, "", "
" ], + col: [ 2, "", "
" ], + area: [ 1, "", "" ], + _default: [ 0, "", "" ] + }; -jQuery.fn.extend({ - text: function( text ) { - if ( typeof text !== "object" && text != null ) - return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) ); +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; - var ret = ""; +// IE can't serialize and