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
    2,098
    Thanks
    120
    Thanked 79 Times in 79 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. #2
    Senior Coder chump2877's Avatar
    Join Date
    Dec 2004
    Location
    the U.S. of freakin' A.
    Posts
    3,063
    Thanks
    29
    Thanked 171 Times in 162 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 !! :-)
    [Instructional videos and tutorials are also available on YouTube, Dailymotion, and Vimeo]
    Get free updates about new software version releases, features, and bug fixes!
    ♪♪ …Need Web Hosting For My YouTube-To-Mp3 Conversion Software? Check Here !!… ♪♪

  3. #3
    Senior Coder
    Join Date
    Dec 2005
    Location
    Slovenia
    Posts
    2,098
    Thanks
    120
    Thanked 79 Times in 79 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
  •