Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
html5 way to ignore children mouse events
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  13 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hudson Ansley  
View profile  
 More options Aug 29 2012, 1:48 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 13:48:52 -0400
Local: Wed, Aug 29 2012 1:48 pm
Subject: html5 way to ignore children mouse events
There seem to be a lot of hacky ways in html5/Javascript to do
something similar to setting mouseChildren to false in AS3, but I
thought I'd check with the experts here for recommendations. In this
case I'm using jQuery, so not that interested in solutions involving
other frameworks for this.

My situation is simple, and I assume fairly common. I have a div with
several children. I want to have an action performed (involving
animating the children) on rollover and rollout of this container div,
however, these get triggered whenever the mouse rolls over one of the
children divs, and that really slows things down.

Ideally I'd like to avoid having the children mouse events happen at
all. Wondering if maybe a transparent div on top might work, but since
the size of the rollover div changes, might be tricky... and
transparency is another big cross-browser headache hack.

Oh, and we're still supporting IE 7 and 8, which always adds to the fun.

Thanks in advance for any suggestions.
Regards,
Hudson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Tan Ucer  
View profile  
 More options Aug 29 2012, 1:57 pm
From: Ali Tan Ucer <alitanu...@gmail.com>
Date: Wed, 29 Aug 2012 13:57:30 -0400
Local: Wed, Aug 29 2012 1:57 pm
Subject: Re: [FlashCodersNY] html5 way to ignore children mouse events

This might help.. >>
http://scie.nti.st/2009/4/5/prevent-javascript-onclick-event-from-bub...

This is for onclick but you can modify it for hover i guess.

On Wed, Aug 29, 2012 at 1:48 PM, Hudson Ansley <hudsonans...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tyler Larson  
View profile  
 More options Aug 29 2012, 1:59 pm
From: Tyler Larson <tallty...@gmail.com>
Date: Wed, 29 Aug 2012 13:59:23 -0400
Local: Wed, Aug 29 2012 1:59 pm
Subject: Re: [FlashCodersNY] html5 way to ignore children mouse events

how about plain old on the parent element, you can also check for the events target being what you are looking for.
event.preventDefault();
event.stopPropagation();

On Aug 29, 2012, at 1:48 PM, Hudson Ansley <hudsonans...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Christopher  
View profile  
 More options Aug 29 2012, 2:07 pm
From: Christopher <damassi.pap...@gmail.com>
Date: Wed, 29 Aug 2012 11:07:13 -0700 (PDT)
Local: Wed, Aug 29 2012 2:07 pm
Subject: Re: [FlashCodersNY] html5 way to ignore children mouse events

e.preventDefault() should work.  


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hudson Ansley  
View profile  
 More options Aug 29 2012, 2:11 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 14:11:18 -0400
Local: Wed, Aug 29 2012 2:11 pm
Subject: Re: [FlashCodersNY] html5 way to ignore children mouse events
k, thanks guys. At least that confirms the solutions I was finding...
mainly wanted to make sure there was nothing as simple as the
mouseChildren flag...
also, too bad IE<9 has to have some other way of calling this... well,
JS dev is nothing if not a ball of hacks :-)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "{NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events" by Hudson Ansley
Hudson Ansley  
View profile  
 More options Aug 29 2012, 2:57 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 14:57:19 -0400
Local: Wed, Aug 29 2012 2:57 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events
Still not seeing a good solution. I don't think stopPropagation or
preventDefault are applicable to this situation.
The basic problem is that rolling over the children triggers a
mouseout event for the parent, and the currentTarget and Target are
identical to when you actually roll completely off the parent, so not
sure what to check to ignore the event.

http://jsfiddle.net/hudson42/kfygq/17/

TIA for any insights, dope slaps or the like
Regards,
Hudson


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hudson Ansley  
View profile  
 More options Aug 29 2012, 3:10 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 15:10:29 -0400
Local: Wed, Aug 29 2012 3:10 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events
hey, the mouseEnter, mouseLeave was what I was looking for, THANKS!

And it is pretty simple:
http://jsfiddle.net/hudson42/kfygq/25/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hudson Ansley  
View profile  
 More options Aug 29 2012, 3:11 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 15:11:11 -0400
Local: Wed, Aug 29 2012 3:11 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events
heh, exactly, thanks again


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Tan Ucer  
View profile  
 More options Aug 29 2012, 3:12 pm
From: Ali Tan Ucer <alitanu...@gmail.com>
Date: Wed, 29 Aug 2012 15:11:59 -0400
Local: Wed, Aug 29 2012 3:11 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events

Is that the reason that we have these to events other than mouseover and
mouseout??

On Wed, Aug 29, 2012 at 3:10 PM, Hudson Ansley <hudsonans...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hudson Ansley  
View profile  
 More options Aug 29 2012, 3:34 pm
From: Hudson Ansley <hudsonans...@gmail.com>
Date: Wed, 29 Aug 2012 15:34:55 -0400
Local: Wed, Aug 29 2012 3:34 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events
I think this is jQuery's solution to the problem I originally
described, and apparently also Microsoft - jQuery makes microsoft's
mouseEnter and mouseLeave work cross-browser

http://www.quirksmode.org/js/events_mouse.html#mouseenter

On Wed, Aug 29, 2012 at 3:11 PM, Ali Tan Ucer <alitanu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Tan Ucer  
View profile  
 More options Aug 29 2012, 3:37 pm
From: Ali Tan Ucer <alitanu...@gmail.com>
Date: Wed, 29 Aug 2012 15:37:18 -0400
Local: Wed, Aug 29 2012 3:37 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events

Wow.. this is a major problem with a hack solution. i love standards!!! :)

On Wed, Aug 29, 2012 at 3:34 PM, Hudson Ansley <hudsonans...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ali Tan Ucer  
View profile  
 More options Aug 29 2012, 3:48 pm
From: Ali Tan Ucer <alitanu...@gmail.com>
Date: Wed, 29 Aug 2012 15:48:53 -0400
Local: Wed, Aug 29 2012 3:48 pm
Subject: Re: {NYCoders} Re: [FlashCodersNY] html5 way to ignore children mouse events

Btw... how does Jquery solves this issue? (on Chrome, Safari, etc.) could
be an interesting thing to dig in.

On Wed, Aug 29, 2012 at 3:37 PM, Ali Tan Ucer <alitanu...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "html5 way to ignore children mouse events" by Benjamin Cheung
Benjamin Cheung  
View profile  
 More options Aug 29 2012, 3:55 pm
From: Benjamin Cheung <benjamin.che...@gmail.com>
Date: Wed, 29 Aug 2012 15:55:07 -0400
Local: Wed, Aug 29 2012 3:55 pm
Subject: Re: [FlashCodersNY] html5 way to ignore children mouse events

I think I ran into a similar situation and found that the on() event in
jQuery has a selector parameter you can use to keep mouseover from
activating anything else.
http://api.jquery.com/on/

Hope this helps.
-b

On Wed, Aug 29, 2012 at 2:11 PM, Hudson Ansley <hudsonans...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »