Something like this:
$(#wrapper *).hover( ... );
The lets you select all child elements, which is what you want. Enjoy!
--John
How can I attach the hover event to all elements in another element?
For example:
div id=wrapper
h1Hello/h1
pTest hello/p
/div
I
Hi John,Thanks so much for the quick response. That works a treat.Can I take it one step further and only attach it to direct children? e.g the b gets left out (and any other sub sub elements).
TomP.S. JQuery rocks... you're a god. You might actually be the god. ;)On 10/20/06, John Resig
Can I take it one step further and only attach it to direct children?
e.g the b gets left out (and any other sub sub elements).
Yep - $(#foo *) only grabs direct children (which is what you
want). If you want to grab all descendants (children and children of
children and children of
That's great... it makes me feel nice.ThanksOn 10/20/06, John Resig [EMAIL PROTECTED] wrote:
Can I take it one step further and only attach it to direct children? e.g the b gets left out (and any other sub sub elements).
Yep - $(#foo *) only grabs direct children (which is what youwant). If