jquery how is $(this) really stored? -
see this basic example:
<div id="cont"> <input type=button value='button'> </div> <input type=button value='button'> and script:
$('input').click(function(){ console.log($(this)); console.log($('#cont').has($(this))); console.log($('#cont').has($(this)).length); console.log("---"); }); in both button-click value of $(this) according console.log same:
[<input type="button" value="button">] why give still different results?
in other words information not represented when console log $(this). information may points element unique id. it, stored? why not showed in log?
it looks it's same since buttons have same markup.
Comments
Post a Comment