Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts

    bubbling event, nested elements, mouse out

    looking for function that would tell me that on mouse out was realy out of outer DIV i.e. id = "1"

    Code:
    <body>
     <DIV  id = "1" onmouseout = "somefunc(this,event)">
    
        <DIV id = "11">
           <DIV id = "111">
           </DIV>
        </DIV>
      
        <DIV id = "12">
        </DIV> 
    
      </DIV>
    <body>
    Did tons of googling, testing, no use. Main reason that experiments failed was
    that move out of div 12 doesn't move into div1 but direct to body.

    this:
    Code:
      var exitElement = evt.relatedTarget || evt.toElemenn
    returns into which element mouse moved.
    our right answer would be: exitControl is valid if it is
    parent node, sibling or any higher placed elements in DOM tree
    looking at
    DIV id = "1"



    any ideas, help appreciated.

  • #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    2,747
    Thanks
    18
    Thanked 155 Times in 146 Posts
    i don;t really have time right now to look over your code, but I just had this issue a couple of days ago...try checking out these links:

    http://dynamic-tools.net/toolbox/isMouseLeaveOrEnter/

    http://www.quirksmode.org/js/events_order.html
    Regards, R.J.

    ---------------------------------------------------------

    Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
    [Related videos and tutorials are also available at my YouTube channel and on Dailymotion]
    Get free updates about new software version releases, features, and bug fixes!

  • #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    1,958
    Thanks
    120
    Thanked 76 Times in 76 Posts
    The first link solves the problem. Works the same on IE and FF.

    Thanks.
    Last edited by BubikolRamios; 02-14-2007 at 08:57 PM.


  •  

    Posting Permissions

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