How to trigger the hover event for a div element along with all its children using jquery? -


i want trigger hover event div element along children using jquery.

currently writing hover event below:

$("#divid").hover(function()    {     //code on hovering in    },    function()    { // code on hovering out     });  

when move cursor child element, "code on hovering out" getting executed, want 'code on hoverig in' executed becuase still hovering on chidren of #divid.

please suggest suitable method achieve this. in advance.

the way

$("#divid").hover(function() {    }); 

should work. shouldn't worry children part of parent div. works on children too.

the way $("#divid").children() redundant.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -