Javascript to change nested styles

    Date: 09/06/07 (Javascript Community)    Keywords: css, java

    I have a LI with an ID of subnav1. Within that object I have a link object, a.

    I know I can change the color of text in LI with
    document.getElementById('snav1').style.color="#5378af";

    But is there a way - without assigning an id to the link object a - to change all the link colors within the object subnav1?

    In CSS we would use #subnav1 a { color: #5378af; }

    I am trying to do the same thing with Javascript.

    Source: http://community.livejournal.com/javascript/140734.html

« Ajax/Javascript || Random Link »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home