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に変換しますか?
document.getElementsByClassName('x')[5]
$('.x')[5]動作しないようです。私は一緒に行くことができました
$('.x')[5]
$('.x').each(){function(i){ if(i==5) return $(this) })
しかし、より簡単なインラインの方法が必要です。
:eq()セレクターを使用できます:
:eq()
$('.x:eq(5)');