search for: toggleclassname

Displaying 2 results from an estimated 2 matches for "toggleclassname".

2007 Apr 20
4
prototype addClassName, toggleClassName
I have a question about prototype''s addClassName, removeClassName, and toggleClassName. As expected, these functions add or remove a class name from an element. When adding, the class names are appended to the end of the class list of the element. Could this affect the rendering of the element? Does the order of css class names in the element''s class attribute matter?...
2009 Feb 15
2
Collapsible Fieldset
...ble, like they are, for example, on many Drupal pages. What I''ve figuared out is the following: <fieldset id="addressdata" class="collapsible collapsed"> <legend> <%= link_to_function("Show/Hide Addressdata") { |page| page[: addressdata].toggleClassName(''collapsed'') } %> </legend> ... some forms etc. here ... </fieldset> In CSS, I do a display:none for the class ''.collapsed'', but display:block for ''.collapsed legend''. So this is working. But it doesn''t look very we...