Try: $$(".dealerAddress").each(function(element)
{element.removeClassName("dealerAddress")}); This will "unhide them".
Not sure if this will be any faster.

On Jan 26, 1:06 pm, kenxle <kenstcl...@gmail.com> wrote:
> Here's the problem I'm running into:
>
> $$(".dealerAddress").invoke("hide");
> takes too long because a very large page structure is loading, and
> there are many dealer addresses, so my page shows everything, then
> hides it, when it loads. Ew.
>
> To fix this, I put .dealerAddress{display:none;} in my CSS style
> sheet. However, when Prototype runs its show/hide functions (I'm using
> "toggle"), it only seems to be adding the attribute <...
> style="display:none"> or removing it. Which means that my style sheet
> takes back over when it removes the attribute, and the tag ends up
> never showing.
>
> I fixed it by putting my style declaration inline in the tag, as
> Prototype does, but I find this solution hackish and obtrusive. Why
> doesn't Prototype toggle from <... style="display:none"> to <...
> style="display:[inline||block]">? Wouldn't this solve my problem, as
> the inline style declaration would override the style sheet
> declaration?
>
> If so, I'd like to propose it as an update. Discussion or alternate
> solutions welcome.
>
> Thanks.
>
> (P.S. jQuery handles this situation without issue...)

-- 
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 prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to