git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Used the patch from Alexander as the basis for a rewrite of the IE change event logic...
[jquery.git]
/
src
/
manipulation.js
diff --git
a/src/manipulation.js
b/src/manipulation.js
index
930b3d9
..
cfb9c9d
100644
(file)
--- a/
src/manipulation.js
+++ b/
src/manipulation.js
@@
-1,7
+1,7
@@
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rleadingWhitespace = /^\s+/,
rxhtmlTag = /(<([\w:]+)[^>]*?)\/>/g,
- rselfClosing = /^(?:abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i,
+ rselfClosing = /^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&\w+;/,
rtagName = /<([\w:]+)/,
rtbody = /<tbody/i,
rhtml = /<|&\w+;/,
@@
-32,6
+32,12
@@
if ( !jQuery.support.htmlSerialize ) {
jQuery.fn.extend({
text: function( text ) {
jQuery.fn.extend({
text: function( text ) {
+ if(jQuery.isFunction(text)) {
+ return this.each(function() {
+ return jQuery(this).text( text.call(this) );
+ });
+ }
+
if ( typeof text !== "object" && text !== undefined ) {
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
if ( typeof text !== "object" && text !== undefined ) {
return this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );
}
@@
-87,7
+93,7
@@
jQuery.fn.extend({
}
}).end();
},
}
}).end();
},
-
+
append: function() {
return this.domManip(arguments, true, function(elem){
if ( this.nodeType === 1 ) {
append: function() {
return this.domManip(arguments, true, function(elem){
if ( this.nodeType === 1 ) {
@@
-273,7
+279,7
@@
function cloneCopyEvent(orig, ret) {
var i = 0;
ret.each(function(){
var i = 0;
ret.each(function(){
- if ( this.nodeName !== orig[i].nodeName ) {
+ if ( this.nodeName !== (orig[i] && orig[i].nodeName) ) {
return;
}
return;
}