[jQuery] Collapsible / toggable table rows
Hi,
I am looking to implement collapsible and toggable table rows as you
can see in this demo:
http://www.mortgageworkout.co.uk/demo.html
It is broken for some reason.
1: Colspan does not work.
2: I have a problem with relationships of elements as well.
My current code is:
$(document).ready(function(){
$('.description').hide();
$('a.details').click(function() {
$(this).parents('table:first').find('.description').toggle(400);
return false;
});
});
I want to toogle the row classed "description", when user clicks the
link classed "detail" in the row above. Animation would be nice, but
it is optional.
Could you help?