I'm currently trying to create a very particular rollover effect.
I need to programmatically modify a number of images.
A short example of the current html, which I'm trying to modify.
Expand|Select|Wrap|Line Numbers
- <a href="temp.html"onMouseOver="mouseover(this);"><span class="p1CE"><img src="1.png"></span><span class="p1CB"><img src="1.png"></span></a>
When the mouseover event is triggered, the mouseover function receives the link object. I can use this to go through the SPAN's using childNodes. However I cant figure out how to rewrite the SPANs content!
All I need to do is modify each
Expand|Select|Wrap|Line Numbers
- <img src="1.png">
Expand|Select|Wrap|Line Numbers
- <img src="1hl.png">
There is only ever 1 IMG inside a SPAN.
Any help would be greatly appreciated.
Thanks
PS. If I have missed the obvious its because this is my second day learning JavaScript so apologies in advance.