There is certainly something else, maybe bad mark-up or another script
messing with jQuery. It's working fine as you can see at http://jsbin.com/ojito/

On Jan 18, 11:59 pm, lideln <lid...@gmail.com> wrote:
> Hi all,
>
> I'm using jQuery 1.3, and I'm having troubles with the ">" selector : it
> only returns ONE element !
> [code]
>    <div id="coucou">
>       <div class="test">bla</div>
>       <div class="test">bla</div>
>       <div class="test2">bla</div>
>       <div class="test">bla</div>
>       <div class="test2">bla</div>
>       <div class="test">bla</div>
>       <div class="test">bla</div>
>       <div class="test2">bla</div>
>       <div class="test">bla</div>
>    </div>
> [/code]
> [code]
>    var aSel = $("#coucou > .test");
>    log(aSel); // displays :  Object length=1 prevObject=Object
> context=document
>    aSel.css("background-color", 'red'); // Only the first div.test becomes
> red
> [/code]
>
> Do you have the same issue ? (you should...)
> How to fix it ? I searched the web but did not find the answer.
>
> Thanks all !
>
> PS : I also posted this message on jqueryhelp.com forum
>
> --
> View this message in 
> context:http://www.nabble.com/jQuery-1.3-and-%22%3E%22-selector-tp21535798s27...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.

Reply via email to