formatting on table cells lost when using jQuery
A table is hidden when the page loads.
When the user clicks on a checkbox the table will slide down.
When I don't use jQuery to manipulate the table there is spacing between the cells.
If I
do use jQuery, then the spacing between the cells is lost, despite me not changing any class/id attributes.
There are two tables with the class ".formTable" on the page and it's the second one, hence my referring to it using '.formTable:eq(1)'.
The table doesn't have any IDs. This is the code I was trying to use:
-
$('input[@name="inform_friends"]').click( function(){
if (this.checked) {
$('.formTable:eq(1)').slideDown('slow');
}
else {
$('.formTable:eq(1)').slideUp('slow');
}
})
Hope you can help me. Many thanks, Gabe.