Connecting Tech Pros Worldwide Help | Site Map

Setting or getting body.class on IE

John W. Kennedy
Guest
 
Posts: n/a
#1: Oct 16 '05
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"
RobG
Guest
 
Posts: n/a
#2: Oct 16 '05

re: Setting or getting body.class on IE


John W. Kennedy wrote:[color=blue]
> Is there any way at all of either setting or getting body.class that
> will work on never-to-be-sufficiently-damned IE?
>[/color]

Try:

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



--
Rob
John W. Kennedy
Guest
 
Posts: n/a
#3: Oct 16 '05

re: Setting or getting body.class on IE


RobG wrote:[color=blue]
> John W. Kennedy wrote:
>[color=green]
>> Is there any way at all of either setting or getting body.class that
>> will work on never-to-be-sufficiently-damned IE?
>>[/color]
>
> Try:
>
> var theBody = document.body || document.documentElement;
> alert(theBody.className);[/color]

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"
Closed Thread