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.

edited example


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -