Flowdock
method

toggle

Importance_1
v2.3.8 - Show latest stable - 0 notes - Class: ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
toggle(*ids) public

Toggles the visibility of the DOM elements with the given ids. Example:

 # Show a few people
 # Generates: ["person_14", "person_12", "person_23"].each(Element.toggle);
 page.toggle 'person_14', 'person_12', 'person_23'      # Hides the elements
 page.toggle 'person_14', 'person_12', 'person_23'      # Shows the previously hidden elements
Show source
Register or log in to add new notes.