This does not work on IE8, but in all other browsers:
myDialog = $('#myDialog');
somethingHere = $('#somethingHere');
In other words, if the variable name and the element id name are the SAME jQuery 1.5.1 dies on IE8.
As long as they are different it works.
myDialog1 = $('myDialog');
Took me just 3 hours to realize that. 😐
Is that a bug or expected behavior?
This probably has to do with the fact that if you declare a global variable with the same name as a DOM element ID, it will conflict in the global namespace. I think this will cause you problems in any browser, maybe IE just complains more. e.g. in a script debugger in any browser:
Whoops! No longer possible to reference the DOM element by ID. DOM element IDs and global variable share the same namespace.