IDs are supposed to be unique. You should change subgroup into a class
then you can do the following to select it:

$('#group2 .subgroup')

On Apr 28, 4:04 pm, Dragon-Fly999 <dragon-fly...@hotmail.com> wrote:
> Hi, I have the following html and would like to find out how to select
> #subgroup under #group2.  I tried $(#group2 #subgroup) but that didn't
> seem to work.  Thank you.
>
> <div id="main">
>   <div id="group1">
>     <div id="subgroup">
>     ...
>     </div>
>   </div>
>
>   <div id="group2">
>     <div id="subgroup">
>     ...
>     </div>
>   </div>
>
>   <div id="group3">
>     <div id="subgroup">
>     ...
>     </div>
>   </div>
> </div>

Reply via email to