Skip to content

Commit

Permalink
Fix Element.toggle logic
Browse files Browse the repository at this point in the history
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 e3655ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -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);
}
},

Expand Down
2 changes: 1 addition & 1 deletion railties/html/javascripts/prototype.js
Expand Up @@ -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);
}
},

Expand Down

0 comments on commit e3655ef

Please sign in to comment.