Also, as an aside, I'm not sure the browser handles Javascript last,
just asynchronously. If you have:

<link ... />
<link .../>
<script .../>
<link .../>

I'm pretty sure it will fetch your css first, then wait on the JS,
then load the next CSS file.

On Mar 17, 8:40 pm, MonkeyBall2010 <hughes.timo...@gmail.com> wrote:
> OK, this did the trick, thanks!
>
> On Mar 16, 7:15 pm, Karl Swedberg <k...@englishrules.com> wrote:
>
> > This is the best way I've found to initially hide content with  
> > JavaScript without having the flash of unstyled content.
>
> >http://www.learningjquery.com/2008/10/1-awesome-way-to-avoid-the-not-...
>
> > --Karl
>
> > ____________
> > Karl Swedbergwww.englishrules.comwww.learningjquery.com
>
> > On Mar 16, 2009, at 5:19 PM, Jonathan wrote:
>
> > > Since the browser will always have the Markup and CSS before the
> > > javascript is finished it's a pretty typical approach to avoid seeing
> > > stuff before the JS  is done, although having a simplified version of
> > > your page that is accessible to users without JS enabled (for instance
> > > all the tabs visible from the start like you're seeing) is important,
> > > and if you only show content once javascript is loaded you're
> > > basically serving an invisible page to people that disable it.
>
> > > On Mar 16, 1:32 pm, MonkeyBall2010 <hughes.timo...@gmail.com> wrote:
> > >> Is this the best practices workaround? I hardly ever see this on  
> > >> other
> > >> sites that use jQuery or a similar JS library.
>
> > >> On Mar 13, 7:20 pm, James <james.gp....@gmail.com> wrote:
>
> > >>> For jQuery UI Tabs I get that issue too where it will display the  
> > >>> HTML
> > >>> list before turning into tabs. Though usually only just for the
> > >>> initial load where the JS scripts have not been cached yet.
>
> > >>> The only workaround I've tried was making the <div> container for  
> > >>> your
> > >>> tabs hidden initially, and when the tabs script is finally set, show
> > >>> the div.
>
> > >>> On Mar 13, 2:08 pm, MonkeyBall2010 <hughes.timo...@gmail.com> wrote:
>
> > >>>> I've noticed that when I put something in the $(document).ready
> > >>>> function my page will load the HTML and then theJavaScriptwill kick
> > >>>> in. For example, I make a series of tabs with the jQuery UI library
> > >>>> and then I visit the page. The content in the tabs will display
> > >>>> regularly for a split second and then it will "jump" into the  
> > >>>> tabbed
> > >>>> configuration. When I go to other websites I don't see this
> > >>>> behavior...
>
> > >>>> Is there a way to preload theJavaScriptso that the page appears as
> > >>>> intended before the user is able to view it?
>
> > >>>> Thanks,
> > >>>> Tim- Hide quoted text -
>
> > >>> - Show quoted text -- Hide quoted text -
>
> > - Show quoted text -

Reply via email to