Side navigation
Ticket #1681: src-1681.diff
File src-1681.diff, 0.6 KB (added by genezys, August 15, 2008 10:51AM UTC)
Index: src/core.js
===================================================================
--- src/core.js (revision 5830)
+++ src/core.js (working copy)
@@ -1304,8 +1304,9 @@
jQuery.className.remove( this, classNames );
},
- toggleClass: function( classNames ) {
- jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
+ toggleClass: function( classNames, b ) {
+ if( typeof b === 'undefined' ) b = !jQuery.className.has( this, classNames );
+ jQuery.className[ b ? "add" : "remove" ]( this, classNames );
},
remove: function( selector ) {
Download in other formats:
Original Format
File src-1681.diff, 0.6 KB (added by genezys, August 15, 2008 10:51AM UTC)
Index: src/core.js
===================================================================
--- src/core.js (revision 5830)
+++ src/core.js (working copy)
@@ -1304,8 +1304,9 @@
jQuery.className.remove( this, classNames );
},
- toggleClass: function( classNames ) {
- jQuery.className[ jQuery.className.has( this, classNames ) ? "remove" : "add" ]( this, classNames );
+ toggleClass: function( classNames, b ) {
+ if( typeof b === 'undefined' ) b = !jQuery.className.has( this, classNames );
+ jQuery.className[ b ? "add" : "remove" ]( this, classNames );
},
remove: function( selector ) {