Permalink
Browse files

Fix Element.toggle logic

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2521 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
sstephenson committed Oct 10, 2005
1 parent d736568 commit e3655ef733f7f69a4b1175cd6843f8bfe4c32f5d
@@ -778,7 +778,7 @@ Object.extend(Element, {
toggle: function() {
for (var i = 0; i < arguments.length; i++) {
var element = $(arguments[i]);
- Element[Element.visible(element) ? 'show' : 'hide'](element);
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
}
},
@@ -778,7 +778,7 @@ Object.extend(Element, {
toggle: function() {
for (var i = 0; i < arguments.length; i++) {
var element = $(arguments[i]);
- Element[Element.visible(element) ? 'show' : 'hide'](element);
+ Element[Element.visible(element) ? 'hide' : 'show'](element);
}
},

0 comments on commit e3655ef

Please sign in to comment.