On Apr 26, 12:12 am, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> As I understand it, jQuery document.ready signals way before
> Event.observe(window,'load'...), since it knows somehow that the DOM is
> ready, even if all the graphics haven't loaded yet.
>
> Is there a similar event I could hook on to in Event.observe that would
> get me the benefit of quickly hiding a big page full of tab content
> before it has a chance to flash on screen?

This has been discussed here before, search for a thread with subject:

" Help! Slow Loading Issue"
<URL:
http://groups.google.com.au/group/rubyonrails-spinoffs/browse_frm/thread/d19259e3a3e39a6b/1c1bc52491612102?lnk=gst&q=Slow+Loading+Issue&rnum=1#1c1bc52491612102
>

The simplest solution is to setup an initialisation function (say
called "init()") that you would have called onload and call it from a
script just before your closing body tag, e.g.:

<body>

  <!-- lots of stuff ... -->

  <script>init && init()</script>
</body>


And save yourself a whole slab of browser-sniffing code that will fail
at least some of the time.


--
Rob


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to