On a page, I have a list of dynamically generated image links 1, 2.. N
that are displayed on the page as follows:
div class=imgBg
img id=imgProd src= alt=/
/div
div id=imgEnum
ul
lispan class=sqr1
I have a list of dynamically generated image hyperlinks that are
displayed on a page as follows:
div class=imgBg
img id=imgProd src= alt=/
/div
div id=imgEnum
ul
lispan class=sqr1
onmouseover=updImage('Images/aaa.01.jpg');1/span/li
I forgot about Firebug! After some debugging, I came up with the code
below which solves the problem:
jQuery(document).ready(function() {
spn0 =$(#imgEnum ul li span).get(0); // Extract span content
from the first list element
sigimgURL =spn0.attributes[0].nodeValue; // Get mouseover
Well the code works! I guess the browser kept staled values in the
cache causing the code to fail. The js script looks as follows:
script type=text/javascript
jQuery(document).ready(function() {
spn0 =$(#imgEnum ul li span).get(0); // Extract span cnt
from first list element
sigimgURL
4 matches
Mail list logo