Ron Piterman
2005-Oct-19 14:19 UTC
how to prevent "blinking" when adding an element with an effect
Hi, I add a div to my document and use an effect to make it apear gracefully. Unfortunatly, when adding the element, the element apears shortly, then the effect (slideDown) lets it apear nicely - so the page flickers abit - What is the best practice to avoid it? Cheers, Ron
Thomas Fuchs
2005-Oct-21 07:42 UTC
Re: how to prevent "blinking" when adding an element with an effect
Heya, Can you put up a simplified version of this where this happens? Plus, what browser are you using (exact version!) Thanks, Thomas Am 19.10.2005 um 16:19 schrieb Ron Piterman:> Hi, > I add a div to my document and use an effect to make it apear > gracefully. > Unfortunatly, when adding the element, the element apears shortly, > then the effect (slideDown) lets it apear nicely - so the page > flickers abit - > What is the best practice to avoid it? > Cheers, > Ron > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
shodhan
2005-Oct-21 09:37 UTC
Re: how to prevent "blinking" when adding an element with an effect
Hi I faced the same issue on IE 6.0.2900.2180, (though the same worked fine on firefox 1.0.7 I used the following code <%= javascript_include_tag :defaults %> <p><a href="#" onclick="new Effect.SlideDown(''source''); return false;">Slide(Scr)</a></p> <div id="wrapper"><div id=''source'' style="display:none;"><div>sukkess</div></div></div> <div> thanks shodhan Thomas Fuchs wrote:> Heya, > > Can you put up a simplified version of this where this happens? > Plus, what browser are you using (exact version!) > > Thanks, > Thomas > > Am 19.10.2005 um 16:19 schrieb Ron Piterman: > >> Hi, >> I add a div to my document and use an effect to make it apear >> gracefully. >> Unfortunatly, when adding the element, the element apears shortly, >> then the effect (slideDown) lets it apear nicely - so the page >> flickers abit - >> What is the best practice to avoid it? >> Cheers, >> Ron >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
snacktime
2005-Oct-21 16:41 UTC
Re: how to prevent "blinking" when adding an element with an effect
On 10/19/05, Ron Piterman <rpiterman-hi6Y0CQ0nG0@public.gmane.org> wrote:> > Hi, > I add a div to my document and use an effect to make it apear gracefully. > Unfortunatly, when adding the element, the element apears shortly, then > the effect (slideDown) lets it apear nicely - so the page flickers abit - > What is the best practice to avoid it? > Cheers, > Ron >I''ve been fighting this issue for months now. One thing that helps is setting the doctype as follows, but it only helps, it doesn''t completely get rid of it. It happens in firefox and IE for me. One thing I noticed is that it''s much worse the larger the area you are sliding, and if there are form elements in the slide area that also makes it worse. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Ron Piterman
2005-Oct-25 10:29 UTC
Re: how to prevent "blinking" when adding an element with an effect
I am not sure we are all addressing the same problem. My concret problem is that : 1. I add a div to the document. 2. the div displays for a short time <-- Thats the problem 3. I let it slide down 4. the div *disapears* and sildes down the problem is that between 2 and 4 the div apears for a short moment, this is very unaesthetic, and all we are talking about in these effects are aesthetics... Cheers, Ron ציטוט Ron Piterman:> Hi, > I add a div to my document and use an effect to make it apear gracefully. > Unfortunatly, when adding the element, the element apears shortly, > then the effect (slideDown) lets it apear nicely - so the page > flickers abit - > What is the best practice to avoid it? > Cheers, > Ron > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >
Francois Beausoleil
2005-Oct-25 12:40 UTC
Re: how to prevent "blinking" when adding an element with an effect
Hi ! 2005/10/25, Ron Piterman <rpiterman@gmx.net>:> I am not sure we are all addressing the same problem. > My concret problem is that : > 1. I add a div to the document. > 2. the div displays for a short time <-- Thats the problem > 3. I let it slide down > 4. the div *disapears* and sildes down > > the problem is that between 2 and 4 the div apears for a short moment, > this is very unaesthetic, and all we are talking about in these effects > are aesthetics...You need to make your DIV style="display: none" before adding it to the document. Then, the browser won't be able to show it, nor will it change the document's look - "display: none" means that the element does not impact presentation. Hope that helps ! François _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Tom Mack
2005-Oct-31 17:51 UTC
Re: how to prevent "blinking" when adding an element with an effect
For me, what caused the flicker was that the script would set the ''overflow: hidden'' property of the element. So if you declare that initially, no more flicker. Something like this: <div style="display: none; overflow: hidden"> Stuff that you want hidden initially. </div> --Tom Ron Piterman wrote:> Hi, > I add a div to my document and use an effect to make it apear gracefully. > Unfortunatly, when adding the element, the element apears shortly, > then the effect (slideDown) lets it apear nicely - so the page > flickers abit - > What is the best practice to avoid it? > Cheers, > Ron > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >