[jQuery] Re: Hide content until loaded

2009-01-17 Thread Pedram
I suggest you to use the toggleClass and your code should look like this $('#tn-loading').toggleClass('hide'); $(document).ready(function() { $('#tn-loading').toggleClass('hide'); }); .hide{ dispaly:none;} so let me explain it this way , we first apply the .hide to the tn- loading, and when t

[jQuery] Re: Hide content until loaded

2009-01-17 Thread jQuery Lover
Saif, do you have a point or is this spam? MorningZ, I am sure you did not have time to go into much details just like me with my first post :) Christine, MorningZ suggested (IMO) the best way to do it. Just keep in mind those users that do not have js enabled. Add some id or class to your tag

[jQuery] Re: Hide content until loaded

2009-01-17 Thread Saif ullah
*http://tinyurl.com/8rwmkr* On Sat, Jan 17, 2009 at 8:13 PM, MorningZ wrote: > > Why not do it with CSS? where css class "tn-loading" has "display: > none" declared > > >Content you are hiding until document "ready" > > > then > > $(document).ready(function() { >//Do some stuff here >

[jQuery] Re: Hide content until loaded

2009-01-17 Thread MorningZ
Why not do it with CSS? where css class "tn-loading" has "display: none" declared Content you are hiding until document "ready" then $(document).ready(function() { //Do some stuff here //Done doing stuff, show the content $('tn-hide').removeClass('tn-loading); }); On Jan 1

[jQuery] Re: Hide content until loaded

2009-01-17 Thread jQuery Lover
// fired right away $('tn-hide').css('display', 'none').addClass('tn-loading'); $(document).ready(function() { // fired on DOM ready }); Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Sat, Jan 17, 2009 at 9:53 AM, Christine Masters wrote: > > Hi everyone! > > I'm