im sorry if im posting duplicate, but iv searched for a long while..

I have nested dom and have script:

                function startVisualAid(){
                        $(".holder > *").hover(
                                function(){
                                        
$(this).parents(".hover_this").trigger('mouseleave').removeClass
("hover_this");
                                        $(this).addClass("hover_this");
                                },
                                function(){
                                        $(this).removeClass("hover_this");
                                        $(this).parents().trigger('mouseenter');
                                }
                        );
                }

this basically works like what i want - add class to a single hovered
item only, not its parents. but things are just getting very slow when
i have a deeply nested doms. I think there must be more simple and
fast way to do this, but i dont know how the stopPropagation thing
work on the hover event. thanks a lot!

Simon

Reply via email to