tags:

views:

32

answers:

1

i have some rows of data displayed in a table and on mouse over of each row i've list two buttons inside a div element and then display it for some time. And i've associated some functions to be called on clicking the buttons that are dynamically created and displayed elements..

So what i did was i wrote a function which will create elements dynamically and place them exactly where i wanted using styles. And i wrote another function which will remove these dynamically added elements.

I called them on mouseover and mouseout events of the row. now when i move mouse out the row to click the button they get disappeared bcoz of my mouseout function.

So how can i proceed this?

And what is the perfect method to create these kind of stuffs?

+2  A: 

use settimeout or setinterval function of javascript for hiding dynamically created elements

check following link for more detail http://www.elated.com/articles/javascript-timers-with-settimeout-and-setinterval/

Pranay Rana
I can use timeout but if i tend to move the mouse very fast through the rows , all the created elements will be displayed and will be hidden only after the timeout (which may look awkward)
kvijayhari