Permalink
Browse files

Renamed Toggle.visibility to Toggle.display and fixed it for multiple…

… arguments

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
dhh committed Mar 21, 2005
1 parent 71dc369 commit 476f26ee908b9d42a08174aaa3ed39db041b54cd
@@ -58,9 +58,10 @@ Try = {
}
Toggle = {
- visibility: function() {
- for (i = 0; i < arguments.length; i++) {
- var element = $(arguments[i]);
+ display: function() {
+ elements = $.apply(this, arguments);
+ for (var i = 0; i < elements.length; i++) {
+ element = elements[i];
element.style.display =
(element.style.display == 'none' ? '' : 'none');
}
@@ -58,9 +58,10 @@ Try = {
}
Toggle = {
- visibility: function() {
- for (i = 0; i < arguments.length; i++) {
- var element = $(arguments[i]);
+ display: function() {
+ elements = $.apply(this, arguments);
+ for (var i = 0; i < elements.length; i++) {
+ element = elements[i];
element.style.display =
(element.style.display == 'none' ? '' : 'none');
}

0 comments on commit 476f26e

Please sign in to comment.