dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: double event generation?

  1. #1
    Join Date
    Apr 2012
    Posts
    2

    double event generation?

    Hi there,

    I've built a page with four buttons, each it its own div tag. I've positioned each div tag with CSS3 so they line up horizontally as desired over another div tag containing an illustration.

    Using jQuery, I've added event listeners for the mouseover and mouseout events. My event listeners work as expected to swap out graphics for the individual buttons.

    The problem is that while the mouseover and mouseout events are generated as expected in the CSS positioned div tags, I am also getting the mouseover and mouseout events from what appear to be hidden areas lower on the page. Those extra event generating areas don't even seem to correspond to anything other than to say they are lower on the page than the visible buttons.

    Does anyone know what is causing this and more importantly, is there something I can do to prevent this double event effect?

    Thanks,
    Pete

  2. #2
    Join Date
    Apr 2012
    Posts
    2
    Well, I found the problem and fixed it. Seems in my code I was listening for the mouse events on the div tag rather than the button it contained. Soon as I changed to code to listen for events from the buttons, my problems went away.

    Pete

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles