By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,818 Members | 2,089 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,818 IT Pros & Developers. It's quick & easy.

Setting or getting body.class on IE

P: n/a
Is there any way at all of either setting or getting body.class that
will work on never-to-be-sufficiently-damned IE?

--
John W. Kennedy
"Information is light. Information, in itself, about anything, is light."
-- Tom Stoppard. "Night and Day"
Oct 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
John W. Kennedy wrote:
Is there any way at all of either setting or getting body.class that
will work on never-to-be-sufficiently-damned IE?


Try:

var theBody = document.body || document.documentElement;
alert(theBody.className);

--
Rob
Oct 16 '05 #2

P: n/a
RobG wrote:
John W. Kennedy wrote:
Is there any way at all of either setting or getting body.class that
will work on never-to-be-sufficiently-damned IE?


Try:

var theBody = document.body || document.documentElement;
alert(theBody.className);


Thanks. That did it.

--
John W. Kennedy
"...if you had to fall in love with someone who was evil, I can see why
it was her."
-- "Alias"
Oct 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.