2009/2/3 T.J. Crowder <[email protected]>:
>
> Hi,
>
> Use a class name to hide them, then remove the class name to show
> them.
>
> E.g., in the html:
>
> <div class='blarg'>...</div>
>
> In the CSS:
>
> .blarg {
>    display:  none;
> }
>
> When you want to hide one, use addClassName to add the class; when you
> want to show it, remove the classname.
>
> HTH,
> --
> T.J. Crowder
> tj / crowder software / com
> Independent Software Engineer, consulting services available
>
> On Feb 3, 2:42 pm, shetc <[email protected]> wrote:
>> Hi All,
>>
>> I'm using Prototype for a small wizard-like display within a web page.
>> The wizard is really a checklist
>> for the user -- as the user checks off that he has completed a
>> required task then the next required task is
>> revealed. This all works great in FireFox -- when the page is first
>> displayed then only the first task to
>> be complete is revealed. However, in IE, the entire set of hidden
>> tasks is briefly displayed then hidden
>> when the page loads. The resultant pages looks correct but it would be
>> nice to get rid of the quick
>> flash of the hidden tasks when the page loads. I do something like the
>> following:
>>
>> Event.observe(window, 'load', function() {
>>      // hide uncompleted tasks
>>      $('div0', 'div1', 'div2', 'div3'').invoke('hide');
>>      ....
>>
>> }
>>
>> Does anyone have any ideas on how to stop the 'IE Flash'?
>>
>> Thanks in advance,
>> Steve
> >
>

Another way is to use <div style="display:none" id="div0">, etc.

This way you can use $('div0').show(); and $('div0').hide(); easily.

You cannot use show/hide if the element has been styled using CSS
(rather than inline style attribute)

See http://prototypejs.org/api/element/show and
http://prototypejs.org/api/element/hide. Look for the note ...

"Element.show cannot display elements hidden via CSS stylesheets. Note
that this is not a Prototype limitation but a consequence of how the
CSS display property works."



-- 
-----
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to