git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix for #921
[jquery.git]
/
src
/
jquery
/
jquery.js
diff --git
a/src/jquery/jquery.js
b/src/jquery/jquery.js
index
e58f895
..
c309428
100644
(file)
--- a/
src/jquery/jquery.js
+++ b/
src/jquery/jquery.js
@@
-824,7
+824,9
@@
jQuery.fn = jQuery.prototype = {
*/
clone: function(deep) {
return this.pushStack( jQuery.map( this, function(a){
*/
clone: function(deep) {
return this.pushStack( jQuery.map( this, function(a){
- return a.cloneNode( deep != undefined ? deep : true );
+ var a = a.cloneNode( deep != undefined ? deep : true );
+ a.$events = null; // drop $events expando to avoid firing incorrect events
+ return a;
}) );
},
}) );
},
@@
-1280,7
+1282,7
@@
jQuery.extend({
prop: function(elem, value, type, index, prop){
// Handle executable functions
if ( jQuery.isFunction( value ) )
prop: function(elem, value, type, index, prop){
// Handle executable functions
if ( jQuery.isFunction( value ) )
- return value.call( elem, [index] );
+ value = value.call( elem, [index] );
// exclude the following css properties to add px
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
// exclude the following css properties to add px
var exclude = /z-?index|font-?weight|opacity|zoom|line-?height/i;
@@
-1513,7
+1515,6
@@
jQuery.extend({
if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
value = 0.9999;
if ( name == "opacity" && jQuery.browser.mozilla && value == 1 )
value = 0.9999;
- //
// Certain attributes only work when accessed via the old DOM 0 way
if ( fix[name] ) {
// Certain attributes only work when accessed via the old DOM 0 way
if ( fix[name] ) {
@@
-1525,10
+1526,12
@@
jQuery.extend({
// IE elem.getAttribute passes even for style
else if ( elem.tagName ) {
// IE elem.getAttribute passes even for style
else if ( elem.tagName ) {
- if ( value != undefined )
- elem.setAttribute( name, value );
+ if ( value != undefined ) elem.setAttribute( name, value );
+ if ( jQuery.browser.msie && /href|src/.test(name) && !jQuery.isXMLDoc(elem) )
+ return elem.getAttribute( name, 2 );
return elem.getAttribute( name );
return elem.getAttribute( name );
+ // elem is actually elem.style ... set the style
} else {
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
if ( value != undefined ) elem[name] = value;
} else {
name = name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});
if ( value != undefined ) elem[name] = value;