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
> 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 received this message because you are subscribed to the Google Groups
> "FlashCodersNY" group.
> To post to this group, send email to flashcodersny@googlegroups.com.
> To unsubscribe from this group, send email to
> flashcodersny+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/flashcodersny?hl=en.
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:
> 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 received this message because you are subscribed to the Google Groups "FlashCodersNY" group.
> To post to this group, send email to flashcodersny@googlegroups.com.
> To unsubscribe from this group, send email to flashcodersny+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/flashcodersny?hl=en.
On Wednesday, August 29, 2012 10:59:26 AM UTC-7, talltyler wrote:
> 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 <hudson...@gmail.com<javascript:>> > wrote:
> > 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 received this message because you are subscribed to the Google > Groups "FlashCodersNY" group. > > To post to this group, send email to flashc...@googlegroups.com<javascript:>.
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 :-)
On Wed, Aug 29, 2012 at 2:07 PM, Christopher <damassi.pap...@gmail.com> wrote:
> e.preventDefault() should work.
> On Wednesday, August 29, 2012 10:59:26 AM UTC-7, talltyler wrote:
>> 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 <hudson...@gmail.com> wrote:
>> > 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 received this message because you are subscribed to the Google
>> > Groups "FlashCodersNY" group.
>> > To post to this group, send email to flashc...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > flashcodersn...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/flashcodersny?hl=en.
> To post to this group, send email to flashcodersny@googlegroups.com.
> To unsubscribe from this group, send email to
> flashcodersny+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/flashcodersny?hl=en.
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.
>> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <hudsonans...@gmail.com>
>> wrote:
>>> 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.
>>> TIA for any insights, dope slaps or the like
>>> Regards,
>>> Hudson
>>> --
>>> You are subscribed to the http://NYCoders.org mailing list.
>>> To post a message, send an email to nycoders@googlegroups.com
>>> To unsubscribe nycoders+unsubscribe@googlegroups.com
>>> For more options, visit http://groups.google.com/group/nycoders?hl=en
>> --
>> Regards,
>> Chad
> --
> Regards,
> Chad
> --
> You are subscribed to the http://NYCoders.org mailing list.
> To post a message, send an email to nycoders@googlegroups.com
> To unsubscribe nycoders+unsubscribe@googlegroups.com
> For more options, visit http://groups.google.com/group/nycoders?hl=en
On Wed, Aug 29, 2012 at 3:04 PM, uɐɯɐǝS pɐɥↃ <chadilla...@gmail.com> wrote:
> secrets in the mouseenter & mouseleave event bindings rather than
> mouseover/mouseout
>>> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <hudsonans...@gmail.com>
>>> wrote:
>>>> 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.
>>>> TIA for any insights, dope slaps or the like
>>>> Regards,
>>>> Hudson
>>>> --
>>>> You are subscribed to the http://NYCoders.org mailing list.
>>>> To post a message, send an email to nycoders@googlegroups.com
>>>> To unsubscribe nycoders+unsubscribe@googlegroups.com
>>>> For more options, visit http://groups.google.com/group/nycoders?hl=en
>>> --
>>> Regards,
>>> Chad
>> --
>> Regards,
>> Chad
> --
> Regards,
> Chad
> --
> You are subscribed to the http://NYCoders.org mailing list.
> To post a message, send an email to nycoders@googlegroups.com
> To unsubscribe nycoders+unsubscribe@googlegroups.com
> For more options, visit http://groups.google.com/group/nycoders?hl=en
> On Wed, Aug 29, 2012 at 3:01 PM, uɐɯɐǝS pɐɥↃ <chadilla...@gmail.com>
> wrote:
> > whoops, just realized I sent the wrong one, here ya go, still fugly.
> >> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <hudsonans...@gmail.com>
> >> wrote:
> >>> 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.
> >>> TIA for any insights, dope slaps or the like
> >>> Regards,
> >>> Hudson
> >>> --
> >>> You are subscribed to the http://NYCoders.org mailing list.
> >>> To post a message, send an email to nycoders@googlegroups.com
> >>> To unsubscribe nycoders+unsubscribe@googlegroups.com
> >>> For more options, visit http://groups.google.com/group/nycoders?hl=en
> >> --
> >> Regards,
> >> Chad
> > --
> > Regards,
> > Chad
> > --
> > You are subscribed to the http://NYCoders.org mailing list.
> > To post a message, send an email to nycoders@googlegroups.com
> > To unsubscribe nycoders+unsubscribe@googlegroups.com
> > For more options, visit http://groups.google.com/group/nycoders?hl=en
> --
> You received this message because you are subscribed to the Google Groups
> "FlashCodersNY" group.
> To post to this group, send email to flashcodersny@googlegroups.com.
> To unsubscribe from this group, send email to
> flashcodersny+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/flashcodersny?hl=en.
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
>> On Wed, Aug 29, 2012 at 3:01 PM, uɐɯɐǝS pɐɥↃ <chadilla...@gmail.com>
>> wrote:
>> > whoops, just realized I sent the wrong one, here ya go, still fugly.
>> >> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <hudsonans...@gmail.com>
>> >> wrote:
>> >>> 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.
>> >>> TIA for any insights, dope slaps or the like
>> >>> Regards,
>> >>> Hudson
>> >>> --
>> >>> You are subscribed to the http://NYCoders.org mailing list.
>> >>> To post a message, send an email to nycoders@googlegroups.com
>> >>> To unsubscribe nycoders+unsubscribe@googlegroups.com
>> >>> For more options, visit http://groups.google.com/group/nycoders?hl=en
>> >> --
>> >> Regards,
>> >> Chad
>> > --
>> > Regards,
>> > Chad
>> > --
>> > You are subscribed to the http://NYCoders.org mailing list.
>> > To post a message, send an email to nycoders@googlegroups.com
>> > To unsubscribe nycoders+unsubscribe@googlegroups.com
>> > For more options, visit http://groups.google.com/group/nycoders?hl=en
>> --
>> You received this message because you are subscribed to the Google Groups
>> "FlashCodersNY" group.
>> To post to this group, send email to flashcodersny@googlegroups.com.
>> To unsubscribe from this group, send email to
>> flashcodersny+unsubscribe@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/flashcodersny?hl=en.
> --
> You are subscribed to the http://NYCoders.org mailing list.
> To post a message, send an email to nycoders@googlegroups.com
> To unsubscribe nycoders+unsubscribe@googlegroups.com
> For more options, visit http://groups.google.com/group/nycoders?hl=en
> 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
> On Wed, Aug 29, 2012 at 3:11 PM, Ali Tan Ucer <alitanu...@gmail.com>
> wrote:
> > 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:
> >> hey, the mouseEnter, mouseLeave was what I was looking for, THANKS!
> >> On Wed, Aug 29, 2012 at 3:01 PM, uɐɯɐǝS pɐɥↃ <chadilla...@gmail.com>
> >> wrote:
> >> > whoops, just realized I sent the wrong one, here ya go, still fugly.
> >> >> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <
> hudsonans...@gmail.com>
> >> >> wrote:
> >> >>> 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.
> >> >>> TIA for any insights, dope slaps or the like
> >> >>> Regards,
> >> >>> Hudson
> >> >>> --
> >> >>> You are subscribed to the http://NYCoders.org mailing list.
> >> >>> To post a message, send an email to nycoders@googlegroups.com
> >> >>> To unsubscribe nycoders+unsubscribe@googlegroups.com
> >> >>> For more options, visit
> http://groups.google.com/group/nycoders?hl=en
> >> >> --
> >> >> Regards,
> >> >> Chad
> >> > --
> >> > Regards,
> >> > Chad
> >> > --
> >> > You are subscribed to the http://NYCoders.org mailing list.
> >> > To post a message, send an email to nycoders@googlegroups.com
> >> > To unsubscribe nycoders+unsubscribe@googlegroups.com
> >> > For more options, visit http://groups.google.com/group/nycoders?hl=en
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "FlashCodersNY" group.
> >> To post to this group, send email to flashcodersny@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> flashcodersny+unsubscribe@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/flashcodersny?hl=en.
> > --
> > You are subscribed to the http://NYCoders.org mailing list.
> > To post a message, send an email to nycoders@googlegroups.com
> > To unsubscribe nycoders+unsubscribe@googlegroups.com
> > For more options, visit http://groups.google.com/group/nycoders?hl=en
> --
> You are subscribed to the http://NYCoders.org mailing list.
> To post a message, send an email to nycoders@googlegroups.com
> To unsubscribe nycoders+unsubscribe@googlegroups.com
> For more options, visit http://groups.google.com/group/nycoders?hl=en
> 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:
>> 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
>> On Wed, Aug 29, 2012 at 3:11 PM, Ali Tan Ucer <alitanu...@gmail.com>
>> wrote:
>> > 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:
>> >> hey, the mouseEnter, mouseLeave was what I was looking for, THANKS!
>> >> On Wed, Aug 29, 2012 at 3:01 PM, uɐɯɐǝS pɐɥↃ <chadilla...@gmail.com>
>> >> wrote:
>> >> > whoops, just realized I sent the wrong one, here ya go, still fugly.
>> >> >> On Wed, Aug 29, 2012 at 2:57 PM, Hudson Ansley <
>> hudsonans...@gmail.com>
>> >> >> wrote:
>> >> >>> 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.
>> >> >>> TIA for any insights, dope slaps or the like
>> >> >>> Regards,
>> >> >>> Hudson
>> >> >>> --
>> >> >>> You are subscribed to the http://NYCoders.org mailing list.
>> >> >>> To post a message, send an email to nycoders@googlegroups.com
>> >> >>> To unsubscribe nycoders+unsubscribe@googlegroups.com
>> >> >>> For more options, visit
>> http://groups.google.com/group/nycoders?hl=en
>> >> >> --
>> >> >> Regards,
>> >> >> Chad
>> >> > --
>> >> > Regards,
>> >> > Chad
>> >> > --
>> >> > You are subscribed to the http://NYCoders.org mailing list.
>> >> > To post a message, send an email to nycoders@googlegroups.com
>> >> > To unsubscribe nycoders+unsubscribe@googlegroups.com
>> >> > For more options, visit
>> http://groups.google.com/group/nycoders?hl=en
>> >> --
>> >> You received this message because you are subscribed to the Google
>> Groups
>> >> "FlashCodersNY" group.
>> >> To post to this group, send email to flashcodersny@googlegroups.com.
>> >> To unsubscribe from this group, send email to
>> >> flashcodersny+unsubscribe@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/flashcodersny?hl=en.
>> > --
>> > You are subscribed to the http://NYCoders.org mailing list.
>> > To post a message, send an email to nycoders@googlegroups.com
>> > To unsubscribe nycoders+unsubscribe@googlegroups.com
>> > For more options, visit http://groups.google.com/group/nycoders?hl=en
>> --
>> You are subscribed to the http://NYCoders.org mailing list.
>> To post a message, send an email to nycoders@googlegroups.com
>> To unsubscribe nycoders+unsubscribe@googlegroups.com
>> For more options, visit http://groups.google.com/group/nycoders?hl=en
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:
> 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 :-)
> On Wed, Aug 29, 2012 at 2:07 PM, Christopher <damassi.pap...@gmail.com>
> wrote:
> > e.preventDefault() should work.
> > On Wednesday, August 29, 2012 10:59:26 AM UTC-7, talltyler wrote:
> >> 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 <hudson...@gmail.com> wrote:
> >> > 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 received this message because you are subscribed to the Google
> >> > Groups "FlashCodersNY" group.
> >> > To post to this group, send email to flashc...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > flashcodersn...@googlegroups.com.
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/flashcodersny?hl=en.
> > To post to this group, send email to flashcodersny@googlegroups.com.
> > To unsubscribe from this group, send email to
> > flashcodersny+unsubscribe@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/flashcodersny?hl=en.
> --
> You received this message because you are subscribed to the Google Groups
> "FlashCodersNY" group.
> To post to this group, send email to flashcodersny@googlegroups.com.
> To unsubscribe from this group, send email to
> flashcodersny+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/flashcodersny?hl=en.