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.
$('#masterDiv div') は、masterDiv の下のすべての div と、これらの div にネストされた div を取得します。1レベルの子供だけを取得するには?
これを使用し$('#masterDiv > div')ます。
$('#masterDiv > div')
子セレクターです。
$("#masterDiv").children("div")
詳細については、ドキュメントを参照してください。
$('#masterDiv').children('div')