I have a simple toggle for a div attached to a chekbox.
$('#step2').hide();
$('#toggle-check').click(function(){
$('#step2').fadeToggle();
})
Why won’t .hide(); select my contents of #step2 ? It’s currently a list of table data, and it isnt hiding it. I’ll end my div early and it will work.
<tr>
<th></th>
<td></td>
</tr>
It’s currently adding my #step2 div above all my table data, so I feel it might be a CSS styling issue?
If you’re wrapping your div#step2 around the table row, it won’t work because it isn’t proper markup. You should wrap it around the entire table.
If you want to keep parts of the table, you should structure it differently.