Added toggle to compliment show and hide for RJS

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3329 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson
2005-12-20 23:25:05 +00:00
parent b05f0c8e49
commit 71dcc6982e

View File

@@ -454,6 +454,11 @@ module ActionView
call 'Element.hide', *ids
end
# Toggles the visibility of the DOM elements with the given +ids+.
def toggle(*ids)
call 'Element.toggle', *ids
end
# Displays an alert dialog with the given +message+.
def alert(message)
call 'alert', message