Problem with .next() and .prev()
Hi i am really stuck here...
My problem is the .next() function which returns unexplainable a undefined value.
The HTML
-
<tr id="tr1" class="title delete">
<td class="newtab" onclick="addTab(this)">Producten</td>
</tr>
<tr id="tr2" class="title delete">
<td class="newtab" onclick="addTab(this)">Test</td>
</tr>
<tr id="tr3" class="title delete">
<td class="newtab" onclick="addTab(this)">Overzicht</td>
</tr>
The JS
-
//this both actions return undefined
$('#tr2').next('.title').attr('id');
$('#tr2').prev('.title').attr('id');
Do i miss something?
Please help...
