<div id="bob">...</div>
<script>var bob = $('bob');</script>
Seems almost identical to the code in the post (mine says "var" and his doesn't, mine uses $ to get element by id, his uses a 'get' function that presumably does the same thing). It does not produce an 'object undefined' error (or any error that I've seen).By "it works fine" I mean that the variable bob references the appropriate DOM element and behaves as expected.
What should I change in the above to reproduce this error?