On Jun 9, 2013, at 12:43 PM, Phil Petree wrote: > show()/hide() > > Set the style inline with style="display:none" and show/hide works but set > the style in css and all of a sudden it doesn't work. > > http://jsfiddle.net/ppetree/pA5eN/ >
This is long-standing well-documented behavior. One way to make it less icky from an HTML standpoint is to use a class-based visibility flag: .hide { display:none } <div id="foo" class="hide">Hidden</div> $('foo').removeClassName('hide'); // = $('foo').show(); The other way to handle this is to hide the elements you want to hide in a callback invoked at page load, but this can lead to a Flash of Unhidden Content on largish pages. $$('#foo, #bar, #baz, .initially-hidden').invoke('hide'); The other thing to think about here is whether hiding these things at page load is good or bad for your unscripted visitors (both of them). Walter -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To unsubscribe from this group and stop receiving emails from it, send an email to prototype-scriptaculous+unsubscr...@googlegroups.com. To post to this group, send email to prototype-scriptaculous@googlegroups.com. Visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en. For more options, visit https://groups.google.com/groups/opt_out.