jQuery - 空のセレクタの例

jQuery –空のセレクターの例

jQueryでは、「empty」セレクターを使用して、子を持たないすべての要素(内部のテキストを含む)を選択します。

This is div-class1

$(‘:empty’) – The “div-class2” is matched, while the “div-class1” is not.

jQueryの例

jQueryの「空の」セレクターの使用を示す簡単な例。



jQuery empty example








jQuery empty example

This is div-class1
This is div-class3
This is div-class3-1