usage of a variable doesnt work in IE

usage of a variable doesnt work in IE

Hello

I have a problem with the usage of variables. In Firefox and Chrome it works well, but IE doesnt accept my coding like this:

  1. $(".myelement").click(function () {
  2.       var hashelement = $(this).attr("id");
  3.       $("table#"+hashelement).show();
  4. });

The alert of the variable "hashelement" represents the right ID of the element, but IE doesnt show the table with the ID. What am I doing wrong?

Thanks domi