When and why does accessing a wrapped set sometimes require array indexing and other times not?
When and why does accessing a wrapped set sometimes require array indexing and other times not? For example,
$(function(){ $('#example')[0].onmouseover = function(event)....
versus
$(function(){ $('#example') .bind('click',function(event) {
here's the pertinent html
<body> <img id="example" src="example.jpg"/> </body>
Either removing the array indexing from the first example or adding array indexing to the second example breaks the code. To my eye the two examples should work identically....