|
Replies:
5
-
Pages:
1
-
Last Post:
Jan 31, 2010 6:23 PM
by: bear.bibeault
|
|
|
Posts:
36
From:
nyc
Registered:
5/6/09
|
|
|
|
finding elements inside other elements
Posted:
Jan 30, 2010 10:37 PM
|
|
can you in jQuery refer to sub-elements? for example can you do with jQuery what you can do like this with CSS?
li.subnav a ?????
how do I in jQuery refer to all 'a' elements that occur ONLY inside an 'li' element of class 'subnav'?????
thank you...
|
|
Posts:
487
From:
Austin TX
Registered:
8/15/05
|
|
|
|
Re: finding elements inside other elements
Posted:
Jan 30, 2010 11:08 PM
in response to:
maya90
|
|
Absolutely!
|
|
Posts:
36
From:
nyc
Registered:
5/6/09
|
|
|
|
Re: finding elements inside other elements
Posted:
Jan 31, 2010 11:07 AM
in response to:
bear.bibeault
|
|
thank you very much.. could you please tell me HOW??
(that was the point of my question.....;_)
|
|
Posts:
487
From:
Austin TX
Registered:
8/15/05
|
|
|
|
Re: finding elements inside other elements
Posted:
Jan 31, 2010 12:50 PM
in response to:
maya90
|
|
You've already got it right:
$('li.subnav a')
|
|
Posts:
36
From:
nyc
Registered:
5/6/09
|
|
|
|
Re: finding elements inside other elements
Posted:
Jan 31, 2010 5:29 PM
in response to:
bear.bibeault
|
|
oh my gosh, had no idea (don't remember seeing this in the book..)
thank you!!!
|
|
Posts:
487
From:
Austin TX
Registered:
8/15/05
|
|
|
|
Re: finding elements inside other elements
Posted:
Jan 31, 2010 6:23 PM
in response to:
maya90
|
|
Chapter 2 clearly calls out all the CSS rules.
For the most part, if it works in CSS, it works as a jQuery selector.
|
|
|
Legend
|
|
Gold: 300
+
pts
|
|
Silver: 100
- 299
pts
|
|
Bronze: 25
- 99
pts
|
|
Manning Author
|
|
Manning Staff
|
|