PragueExpat wrote:

I am wondering when external css styles are applied to the DOM elements.
My external style sheet has a display:none for element A. With JQ on
document.ready, I call the show() method on the element. (this is so people
w/out javascript enabled will not see the element)

Is there any chance that the external style sheet will be applied to the DOM
after the JQ is run?

Which of the following is correct?

1. DOM is loaded
2. JQ runs (the show method is called)
3. CSS is applied to the DOM (overriding my show())

or

1. DOM is loaded
2. JQ runs (the show method is called)
3. CSS is applied to the DOM (not overriding my show() because external CSS
doesn't override style changes by JQ)

or

1. DOM is loaded
2. CSS is applied
3. JQ runs (no problem, because show() is run after the css was applied.

Anyone know the order?

Thanks.


It is the latter case - the element should be visible.

--
Best wishes,
Dave Cardwell.

http://davecardwell.co.uk/javascript/jquery/

Reply via email to