Actually it is located at:
http://brandonaaron.net/jquery/snippets/domready/jquery.domready.js
:)

--
Brandon Aaron

On Mon, Oct 6, 2008 at 8:09 PM, Brandon Aaron <[EMAIL PROTECTED]>wrote:

> The document ready function in 1.2.6 was updated to wait on styles. This is
> a good thing sometimes but other times it causes said flickers. On a few
> recent projects I packaged up the old ready function as domready so that I
> could avoid the flickers. You can find the code here:
> http://brandonaaron.net/jquery/snippets/jquery.domready.js
> You can use it just like you use ready but instead of ready it is domready.
>
> $(document).domready(function() { ... });
>
> I'd also like to make mention that it would be good practice to add a class
> to the body to signify that JS is enabled. Then use CSS to handle the
> display when JS is enabled.
>
> $(document).domready(funciton() {
>     $('body').addClass('jsEnabled'); // let css know js is enabled
> });
>
> Now in CSS you can just say:
>
> body.jsEnabled p.firstparagraph { display: none; }
>
> --
> Brandon Aaron
>
>
> On Mon, Oct 6, 2008 at 7:11 PM, John D. <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi,
>>
>> I've been running into the same problem with the following:
>>
>>  $(document).ready(function() {
>>   $('p.firstparagraph').hide()
>>   $('#hideh1').click(function(){
>>     $('p.firstparagraph').hide(200);
>>   });
>>   $('#showh1').click(function(){
>>     $('p.firstparagraph').show(200);
>>   });
>>  });
>>
>> p.firstparagraph is displaying briefly before the page has completely
>> loaded. I was under the impression that  $(document).ready(function()
>> executed before the page was output for display.
>>
>> style="display:none" has been suggested on some websites but is
>> inaccessible for users with javascript disabled.
>>
>> Any help understanding what is going on is appreciated.
>>
>> Thanks!
>>
>> John
>>
>>
>>
>>
>> On Oct 6, 3:08 pm, Nabha <[EMAIL PROTECTED]> wrote:
>> > Hi there,
>> >
>> > I love jQuery, but I have a question about something I see it doing:
>> >
>> > Content that it is hiding or moving often appears in its original
>> > position *before* it is hidden by jQuery. Is there any good,
>> > accessible way around this?
>> >
>> > You can see the effect in action on a page like this:
>> http://docs.jquery.com/Core/jQuery#html
>> >
>> > Extra content shows up, and is hidden. Sometimes I imagine this kind
>> > of thing would be a little jarring for the average user.
>> >
>> > Thanks!
>>
>
>

Reply via email to