jquery manipulate a tags with .css()

Posted by jesse on Stack Overflow See other posts from Stack Overflow or by jesse
Published on 2010-03-28T02:18:07Z Indexed on 2010/03/28 2:23 UTC
Read the original article Hit count: 205

Filed under:
|
|

I need to change the font color of a div with the id name "nav" to white.

I did:

$("#nav").css("color","white");

This works for all the text that isn't wrapped in < a > tags but I need those changed too.

I tried adding:

$("a").css("color","white");

But that doesn't work. I also tried:

var changeAColor = document.getElementsByTagName("a")
$(changeAColor).css("color","white");

Any ideas appreciated.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript