www.webdeveloper.com
Results 1 to 2 of 2

Thread: inherited onmouse events

  1. #1
    Join Date
    Feb 2007
    Posts
    16

    Question inherited onmouse events

    Is there any way to disable inheritence of onmouseout and onmouseover events, or atleast prevent them? I have a table with an onmouseout event, and cells in it with different onmouseout events, but the cells are also inheriting the event of the table, so if you move the cursor outside of a cell, it executes the table's onmouseout event, even if it is still inside the table. Any ideas on how to fix this??

    Thanks

    PruneyToes

  2. #2
    Join Date
    Feb 2006
    Posts
    2,926
    when you handle an event that bubbles (mouse & key events),
    stop the event from bubbling in the handler.

    somefunction(e){
    e=window.event || e;
    e.cancelBubble=true;
    if(e.stopPropagation)e.stopPropagation();
    //handle event
    }

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