Re: [jQuery] Re: How to Select element with class, but EXCLUDE its children?

2009-11-01 Thread Andrei Eftimie
 Mousing over class=placemark causes it to fire as if there was a
 mouseover on class=Senate.  placemark has its own class, separate
 from the senate class.

This behaviour is actually the way it supposed to be.
mouseover and mouseout fire on each entering / exiting of the elements
and ever element descendants border.

You would want mouseenter and mouseleave to fire *only* on the trigger
element, and ignore its descendants.



 Click on the Alabama Senate.  It will open a scroll within the scroll
 on the left, showing Alabama's senator's names.  When you mouse over
 senator names, the system interprets that as ALSO a mouseover the
 Senate label at the top.  This should not be the case.

See above.

 In any event, the senator names are, quite literally, great-great-
 great-great grandchildren of the Senate label.  How on earth would
 mousing over the  grandchild be the same as mousing over its
 ascendant 6 generations above?

Not sure on the specific details right now, but check
http://www.quirksmode.org/js/events_mouse.html for an explanation.

 Also, if you are on your toes, you will note that the senator names
 italicize, but do not turn blue, when you mouseover them.  So, it is
 somehow (God knows!) getting PART of the class of the 
 grandchild.  The placemark class instructs to not italicize and not
 turn blue.  So, it does not turn blue (good), but it does italicizes
 (bad).

Not sure, but I think this is actually because table element does only
inherit some css properties.
(At least I remember it does so in quirksmode)



-- 
Andrei Eftimie
http://eftimie.com
+40 758 833 281

Punct
http://designpunct.ro


Re: [jQuery] Re: How to Select element with class, but EXCLUDE its children?

2009-11-01 Thread Andrei Eftimie
I understand where you come from. My exprimation was somewhat off.
Please replace with desired with *implemented* or
*the-way-it-actually-works-in-browsers*.

Not sure if it is intended or just the way it is working with now.
Please check the links from quirksmode for further details.

On Sun, Nov 1, 2009 at 7:21 PM, jmatthews jmatth...@xexam.net wrote:


 On Nov 1, 10:54 am, Andrei Eftimie k3liu...@gmail.com wrote:
  Mousing over class=placemark causes it to fire as if there was a
  mouseover on class=Senate.  placemark has its own class, separate
  from the senate class.

 This behaviour is actually the way it supposed to be.
 mouseover and mouseout fire on each entering / exiting of the elements
 and ever element descendants border.

 You would want mouseenter and mouseleave to fire *only* on the trigger
 element, and ignore its descendants.



 Andrei, if this is the desired behavior, I don't understand why it
 should be.  The way I see it is, to use a simpler example:

 body class=class1Goodbye
 div class=class2Hello./div
 /body

 $(.class1).onmouseover(

 $(.class2).onmouseover(

 So, when you mouever class2, it is pretty much pointless, because it
 fires as if you mouse over class1.




-- 
Andrei Eftimie
http://eftimie.com
+40 758 833 281

Punct
http://designpunct.ro


Re: [jQuery] Re: How to Select element with class, but EXCLUDE its children?

2009-11-01 Thread Karl Swedberg


On Nov 1, 2009, at 1:49 PM, jmatthews wrote:


On the topic of mouseenter and mouseleave, which some of you
recommended, quirksmode says only IE supports this method, and the
others do not at this time.  The quirksmode sponsor is very critical
of their failure to incorporate these methods because it would make
the coding far less complex.

So, I guess that is why your suggestions were not working for me

http://www.quirksmode.org/dom/events/index.html


jQuery normalizes the .mouseenter() and .mouseleave() methods across  
all browsers so they act the same way as IE's native mouseenter and  
mouseleave.


--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com



Re: [jQuery] Re: How to Select element with class, but EXCLUDE its children?

2009-10-31 Thread Karl Swedberg
I'd stick with what Scott said. Use mouseenter/mouseleave. But instead  
of setting the style with .css(), just add and remove a class. Here is  
a demo:


http://jsbin.com/enero/edit

--Karl


Karl Swedberg
www.englishrules.com
www.learningjquery.com




On Oct 30, 2009, at 4:26 PM, jmatthews wrote:


I tried them as the description in the reference was not clear as to
why it would be useful.

It doesn't solve the problem.  That it does is make sure that if you
reached the child by entering over the parent, the child event will be
released only by exiting back over the parent.

Kind of odd.

On Oct 30, 2:16 pm, Scott Sauyet scott.sau...@gmail.com wrote:

On Oct 30, 9:30 am, jmatthews jmatth...@xexam.net wrote:


When I mouseover a child, it is thinking it is just the contents of
parent.  I need to restrict mouseover to children only, regardless  
of

the fact that they are encapsulated by parent.


You might want to look at the mouseenter and mouseleave events.

   http://docs.jquery.com/Events/mouseenter

-- Scott




Re: [jQuery] Re: How to Select element with class, but EXCLUDE its children?

2009-10-31 Thread Marcos Javier Riganti
HOW DO I GET OUT OF THIS LIST? !

2009/11/1 Karl Swedberg k...@englishrules.com

 I'd stick with what Scott said. Use mouseenter/mouseleave. But instead of
 setting the style with .css(), just add and remove a class. Here is a demo:

 http://jsbin.com/enero/edit


 --Karl

 
 Karl Swedberg
 www.englishrules.com
 www.learningjquery.com




 On Oct 30, 2009, at 4:26 PM, jmatthews wrote:

 I tried them as the description in the reference was not clear as to
 why it would be useful.

 It doesn't solve the problem.  That it does is make sure that if you
 reached the child by entering over the parent, the child event will be
 released only by exiting back over the parent.

 Kind of odd.

 On Oct 30, 2:16 pm, Scott Sauyet scott.sau...@gmail.com wrote:

 On Oct 30, 9:30 am, jmatthews jmatth...@xexam.net wrote:


 When I mouseover a child, it is thinking it is just the contents of

 parent.  I need to restrict mouseover to children only, regardless of

 the fact that they are encapsulated by parent.


 You might want to look at the mouseenter and mouseleave events.


http://docs.jquery.com/Events/mouseenter


 -- Scott





-- 
Un Abrazo
Marcos J. Riganti
+549 341 54996612
webmas...@nefertiter.com