Ideas to handle mouseover/mouseout bubbling causing each one to trigger the other endlessly

Ideas to handle mouseover/mouseout bubbling causing each one to trigger the other endlessly

I have a situation that I think is generating a conflicting need. On the one hand, I need an event that bubbles up so that I can use the live() method to pick up elements that are added dynamically to the DOM. On the other hand, I am having an issue with the event bubbling up when I am over the element.

Let me explain the best I can: I am using the jQuery auto page function to create the "infinite page" effect. I have another jQuery function that I have written to create an effect on elements on the page. Since I'm using the auto pager, I need to be able to detect elements that have been added to the page dynamically. Therefore, I am using the live() method with the mouseover and mouseout events. My jQuery effect is creating a "slider" inside of a div that is triggered by the mouseover event. What happens to me is that if I code the mouseout event the slider just keeps sliding up and down while the mouse is over the div.

I am using Drupal 6 and the Views Infinite Pager contributed module. I have written my own simple jQuery function to perform the "slider" effect.

You can see my situation at http://dev.furnishbling.com

I have commented out the mouseout event to prevent the slider from sliding up and down non-stop. I have also placed fairly extensive comments in the code to highlight the things I have tried.

One possible new workaround that I will play with is passing the event into the function so that I can check $(event.target). Is this on the right track? Do you have other ideas?










    • Topic Participants

    • marc