Javascript – tagName is null or not an object — error msg in IE7 using latest version of jQuery (1.2.6)

asp.netjavascriptjquery

has anyone else seen this error message. a quick check with google doesn't show me much.

Best Solution

You are probably trying to do something like this....

alert($("#myElement").tagName);

You should do this...

alert($("#myElement")[0].tagName);