I'm doing this example to return a tr value in Jquery but it dosen't work this the example.
$(document).ready(function(){
var i = 1;
$("tr").click(function(e){
e.preventDefault();
var num = $(this).attr('value');
if(i == 1)
{
$(".informations"+num).show('slow');
i = 0;
}
else
{
$(".informations"+num).hide('slow');
i = 1;
}
console.log(num);
});
});
HTML
<tr class="informations1 informations" value="1">
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
Any idea why ? Thanks