0
page = $("<div id="content"><p>aaa</p><p>bbb</p><p>ccc</p></div>").find('p').eq(0);

This can echo `<p>aaa</p>` but How to select multi `eq()` in jqeury? if I need `<p>aaa</p><p>bbb</p>`

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by bvelez352
0

take the eq() out? that way you'll have all three paragraphs.

if you only want the first two to show up, just write.

$('p:last').hide();

if you want the middle one to hide, write

<div id="content"><p>aaa</p><p>bbb</p><p>ccc</p></div>
$('div#content').find('p').eq(1).hide();

you can go here and play with this.

hope this helps

Edited by bvelez352: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.