User Profile
Collapse
-
thanks for your reply. That's so obviously a better way to do this it's shocking. thanks! -
problem using javascript to apply a color to an <li>
In the code below I can sucessfully target an <li> and change it's font size and font weight, but not color.
Am I missing something?
Javascript
...Code://MOUSEOVER function ChangeText(block, blockItem) { if(block==0 && objCounter!=blockItem){ document.getElementById("objectiveList").children[blockItem].className ="links_rolled"; } } -
it works!
That slurping sound you just heard was me kissing the monitor. Thank you, Thank you, Thank you.Leave a comment:
-
thanks! I think the nature of this problem is a mac issue. Searching on "javascript problems with a mac" I see a ton of frustrated coders. Tried your alternative and it doesn't work. Should I throw my mac out the window?Leave a comment:
-
seems to work in IE, but not safari, chrome or firefox. can anyone suggest alternative approach?Leave a comment:
-
huh.
tried posting it to the server and it still doesn't work for me.
http://www.psp.wa.gov/javascripttest_UL.html
I can change the fontWeight for the entire <ul> if I take out "firstChild "so I'm assuming my browser (firefox) isn't blocking it.
thanks for the reply!...Leave a comment:
-
help targeting <li> with javascript
I'm going through the WC3 javascript and DOM tutorials and stuck how some of this applies to <ul>'s
can someone tell me why this doesn't change the first <li> to bold? I'd like to be able to target specific <li>'s and make them bold or change the font-face.
...Code:<html> <head> <SCRIPT type="text/javascript"> function ChangeText(){ document.getElementById("findMe").firstChild.style.fontWeight="bold";Last edited by Dormilich; Mar 9 '11, 10:18 PM. Reason: please use [CODE] [/CODE] tags when posting code
No activity results to display
Show More
Leave a comment: