jquery 番目 指定などでgoogleで検索をかければ色々手法が見つかります。
下記、ご参考までに。
html
1<p class="hoge">hoge1</p>
2<p class="hoge">hoge2</p>
3<p class="hoge">hoge3</p>
4<p class="hoge">hoge4</p>
javasctipt
1$(function() {
2
3 // eq()を使う場合
4 $('.hoge').eq(2).hide();
5 $('.hoge').eq(3).hide();
6
7 // nth-childを使う場合
8 /*
9 $('.hoge:nth-child(3)').hide();
10 $('.hoge:nth-child(4)').hide();
11 */
12
13 // gt(), lt()を使う場合
14 /**
15 $('.hoge:gt(1):lt(3)').hide();
16 */
17});
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/07 10:05