jQueryオブジェクトの比較

by FiNGAHOLiC

HTML

<div id="hoge"></div>

JavaScript

$(function(){
    
    var $hoge = $('#hoge');
    var _$hoge = $('#hoge');
    
    alert($hoge === _$hoge); // false
    alert(_$hoge.is($hoge)); // true
    alert($hoge[0] === _$hoge[0]); // true
    
});