Example included for better understanding:
<table class="grid" border="1">
I try to get the TABLE tag with a parent function
var table = $('.grid tr:first').parent();
This means, get the parent of the first line from a table with the class "grid" assigned to it ("$('.grid table)" won't work btw.), which is the table itself.
Now trying to wrap the table in a DIV tag fails in IE 8 and ends up with a strange behavior in Mozilla.
But if you try to do the same with
everything is fine ...
The variable "table" seems to be a valid element. This code work: