Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-10-2009, 08:54 PM   PM User | #1
WindInFace
New Coder

 
Join Date: Nov 2009
Posts: 40
Thanks: 19
Thanked 0 Times in 0 Posts
WindInFace is an unknown quantity at this point
Change CSS Class

Hi,

I need to change my class, but this isn't doing it for me and I don't see why. No error messages, but nothing happens.
Code:
.myClass {
	background-color: yellow;
}

document.getElementById("myId").setAttribute("class","myClass");
Thank You in Advance for Your Help,

Lou
WindInFace is offline   Reply With Quote
Old 12-10-2009, 09:09 PM   PM User | #2
WindInFace
New Coder

 
Join Date: Nov 2009
Posts: 40
Thanks: 19
Thanked 0 Times in 0 Posts
WindInFace is an unknown quantity at this point
Got it!

Of course after I post a question I get it working.

Thanks for having a look at my question.

Lou
WindInFace is offline   Reply With Quote
Old 12-14-2009, 07:48 PM   PM User | #3
LE1
New Coder

 
Join Date: Nov 2009
Posts: 47
Thanks: 4
Thanked 1 Time in 1 Post
LE1 is an unknown quantity at this point
Thu=ought css would be better anyway?
LE1 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:18 AM.


Advertisement
Log in to turn off these ads.