javascript - How to alert every occurence? -


i need send alert user every time z-index equals 2. unfortunately occurs onload, or ready...whatever...

heres html

<div id='slides'>    <img class='sliderimg' src='img.jpg'>    <img class='sliderimg' src='img.jpg'>    <img class='sliderimg' src='img.jpg'> </div> 

and javascript

document.ready=function(){    var theimage=$('.sliderimg')[0];    if(theimage.style.zindex==2){       alert(theimage.style.zindex);    } } 

you have 2 choices:

1) run timer , call function periodically, using setinterval or settimeout

2) listen dom changes, run function.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -