git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure multiple bound events have their namespaces and data maintained. Fixes...
[jquery.git]
/
src
/
attributes.js
diff --git
a/src/attributes.js
b/src/attributes.js
index
1dd7084
..
82a4de1
100644
(file)
--- a/
src/attributes.js
+++ b/
src/attributes.js
@@
-12,14
+12,7
@@
jQuery.fn.extend({
return access( this, name, value, true, jQuery.attr );
},
return access( this, name, value, true, jQuery.attr );
},
- removeAttr: function( name ) {
- if ( jQuery.isFunction( name ) ) {
- return this.each(function(i) {
- var self = jQuery(this);
- self.removeAttr( name.call(this, i, self.attr(name)) );
- });
- }
-
+ removeAttr: function( name, fn ) {
return this.each(function(){
jQuery.attr( this, name, "" );
if ( this.nodeType === 1 ) {
return this.each(function(){
jQuery.attr( this, name, "" );
if ( this.nodeType === 1 ) {
@@
-99,7
+92,7
@@
jQuery.fn.extend({
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this);
if ( jQuery.isFunction( value ) ) {
return this.each(function(i) {
var self = jQuery(this);
- self.toggleClass( value.call(this, i, self.attr("class")), stateVal );
+ self.toggleClass( value.call(this, i, self.attr("class"), stateVal), stateVal );
});
}
});
}
@@
-288,7
+281,7
@@
jQuery.extend({
if ( set ) {
// We can't allow the type property to be changed (since it causes problems in IE)
if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
if ( set ) {
// We can't allow the type property to be changed (since it causes problems in IE)
if ( name === "type" && rtype.test( elem.nodeName ) && elem.parentNode ) {
- throw "type property can't be changed";
+ jQuery.error( "type property can't be changed" );
}
elem[ name ] = value;
}
elem[ name ] = value;