Hi, all
Consider following code:
<div>
<a href="some_address" id="img_test"><img src="1.jpg">TEST IMG 1</a>
</div>
<script>
(function() {
$('a#img_test').hover(function()
{
console.log($(this));
console.log($(this).html());
});
})();
</script>
If this is run in isolated environment, all is good. On my site, call to html() fails with error:
Uncaught TypeError: Object http://someaddress has no method 'html' The only difference I see is in output of console.log($(this)); I am using development tools in Chrome. When everything works, output of console.log($(this)); is: ( '>' character is a triangle Chrome shows, not an angle bracket)
[> <a href .....></a>]
When it fails, output is
> <a href .....></a>
Note, no square brackets. Rest seem to be exactly same.
I am really lost here. Any suggestions?
Thanks,
Rudolf
Thanks,
Rudolf