タグ: 未設定

jQueryオブジェクトかどうかを調べる : jQuery

投稿日 : 2012年1月28日 | 更新日 : 2012年01月28日 前のページへ戻る

jQueryオブジェクトのインスタンスかどうかを調べるコード。

if ($('<div>Hello</div>') instanceof jQuery) {
    console.log('<div>Hello</div> is jQuery Object');
} else {
    console.log('<div>Hello</div> is not jQuery Object');
}
if ({} instanceof jQuery) {
    console.log('{} is jQuery Object');
} else {
    console.log('{} is Not jQuery Object');
}

JavaScript Library | 固定リンク | Comments (0)

関連記事

    関連記事は見つかりませんでした。
    検索ボックスからの検索もお試しください。

このページの上へ移動

コメント

コメントはまだありません。

コメントの投稿

改行と段落タグは自動で挿入されます。
メールアドレスは表示されません。

 

 

 


トラックバックURL

http://www.findxfine.com/programming/jlibrary/995555314.html/trackback

このページの上へ