Difference between $('selector') and $('selector')[0] in jquery
问题 Assuming i have a <div class="test" style="width:200px"></div> ,Please consider the following: var m = $('.test')[0]; var $md = $(m); console.log($md.width()); //200 var o = $('.test'); console.log(o.width()); // 200 console.log(m); // <div class="test" style="width:200px"> console.log($md); // Object{ context: <div.test> ..... } console.log(o); // Object{ length:1 , ..... } Basically i can apply the width method on either var $md or var o , so what's the difference between the 1st and 2nd