Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
重複の可能性: JQuery:テーブルから行を選択する方法
私はjQueryの初心者です。複数の行を持つテーブルがありますが、特定の行を選択した後、次の行または前の行を選択するにはどうすればよいですか?
次の行の場合(myRowが選択した行要素であると想定):
$(myRow).next();
ただし、現在選択されている要素インスタンスに基づいて前の要素と次の要素を選択するのではなく、非常に強力なセレクター構文を使用することをお勧めします。
http://docs.jquery.com/Selectors
$(this).next();
また
$(this).prev();