You've figured out the problem: just because the DOM is ready to be
manipulated doesn't mean the CSS has been applied.

I'm guessing the JavaScript in question does something based on the
dimensions of the DIV. Make a size call on the DIV and see what it's
returning in that instant; it might be something obvious, like 0, that
reveals it's not ready yet, in which case you can do a setTimeout and
wait 100ms or so.

Cheers,
Andrew

On Jan 11, 2:23 pm, Louis Orenstein <[email protected]> wrote:
> Hi All, I'm seeing some strange behavior with jQuery in Safari.
>
> I have a function defined to run when the DOM is ready using
> $(function(){
>     doSomething();
>
> });
>
> And in FF and IE things work splendidly, but in Safari every now and
> then the DOM is supposedly ready before anything is painted in the window.
>
> The doSomething() function initializes a div to be a jScrollPane, so
> when things work the div has a scrollbar added if necessary, but when
> things mess up the div spills over into the right-hand pane (I have a
> 3-column layout, left-pane is float: left, right-pane is float: right
> and then the center has a left-margin to center it) and the jScrollPane
> functionality isn't really initialized.
>
> So I'm wondering if any of you all have seen this before, and know of a
> solution before I go digging deeper.  I'm thinking that some of the
> flash elements of the page may be interacting with things a little
> strangely, and I can post a link to the site come Monday if anyone is
> interested.
>
> Thanks in advance
> Louis
--~--~---------~--~----~------------~-------~--~----~
Our Web site: http://www.RefreshAustin.org/

You received this message because you are subscribed to the Google Groups 
"Refresh Austin" group.

[ Posting ]
To post to this group, send email to [email protected]
Job-related postings should follow 
http://groups.google.com/group/Refresh-Austin/web/refresh-austins-job-posting-guidelines.
We do not accept job posts from recruiters.

[ Unsubscribe ]
To unsubscribe from this group, send email to 
[email protected]

[ More Info ]
For more options, visit this group at 
http://groups.google.com/group/Refresh-Austin
-~----------~----~----~----~------~----~------~--~---

Reply via email to