I have dynamic divs as rows:
<table border=1><tr><td>
<div id='div1'>fgg</div>
<div id='div2'>dfgdfg</div>
<div id='div3'>vcbcvb</div>
<div id='div4'>sdfsdf</div>
</td></tr></table>
How can I call jQuery function on mouseover of each div?
These divs are dynamic, can vary the number.
I suggest using a class for your divs, and using a selector:
$(".rows")or similar. However, the above will work for the markup you’ve given.If you must use id, this will allow you to add it by id. Keep in mind that as you add new items, you will have to run this code for the id (defeating the dynamic part of your original question).
which you could utilize in a list like so:
This is really a bad approach, I strongly suggest using a class instead.