开发者

trigger mouseover event after manipulate the DOM

I have a list and all elements could be removed by cliking on the 'x' link. The 'x' element appear only when the mouse is over the element (opacity: 0 by default)

When clicking on x, the current element is removed and the next one is replacing the previous one. The problem is the 'x' link is still hidden (no over event is fired while I 开发者_开发知识库don't move the mouse).

Is it a trick to fix this problem ?

Thank you.


if you are not moving your mouse after delete then you can trigger the mouseover of next element through jquery at the end of delete function.

//logic of delete ends here

$("#nexElem-id").trigger("mouseover");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜