Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
110
rated 0 times [  113] [ 3]  / answers: 1 / hits: 18574  / 13 Years ago, thu, february 2, 2012, 12:00:00
<div class=box></div>
<div class=box></div> <!-- Hide -->
<div class=box></div> <!-- Hide -->
<div class=box></div> <!-- Hide -->


I need to hide all this div but not the first div.



I could do something like this:



jQuery('.box').hide();
jQuery('.box').first().show();


Is there a way to remove the first .box from the array before .hide() em?


More From » jquery

 Answers
78
jQuery('.box').slice(1).hide()

[#87669] Wednesday, February 1, 2012, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
nathalieg

Total Points: 462
Total Questions: 106
Total Answers: 93

Location: Turks and Caicos Islands
Member since Tue, Mar 30, 2021
3 Years ago
nathalieg questions
;