i have a very simple table with the bare minimum of html-tags, like e.g.:
<table id="test">
<tr><td>some table cell</td></tr>
</table>
i am trying to check whether a tag is present. the odd thing is: jquery says "yes, there is a tbody tag" even though i have not defined one! what is happening here?
$('table#test').each(function(){
var tbody = $(this).find('tbody');
//how can there be a tbody when there is no <tbody> tag defined?
console.log(tbody.length); //gives 1, should be 0 though as there is no tbody
});
tested in Chrome 28.0, Firefox 22.0 using jQuery 1.6.4 (as current project requires it though it also happens in jQuery 2.0.2)
here is also a jsFiddle: http://jsfiddle.net/nerdess/rH5Lf/