BWJM
06-08-2011, 08:47 PM
1) Script Title:
Animated Collapsible DIV v2.4
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
I would like to be able to collapse rows within a table. So instead of having a <div>, I want to put the id on a <tr> tag and have the <tr> tag flip between display:table-row and display:none.
The script almost works as-is, but instead of restoring the row with display:table-row, it restores it with display:block (which would be appropriate for <div> tags, but not <tr> tags).
Would it be possible to get some assistance in adapting the code to detect if the element returned by a particular ID is a <tr> or a <div> and use the appropriate display values?
Note: I do not want to collapse an entire table (otherwise I would just wrap the table in a <div> tag. I want to collapse specific rows in the table.
Note: For reference, here is a link to information on the CSS display tag.
http://www.w3schools.com/css/pr_class_display.asp
Thanks
Animated Collapsible DIV v2.4
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex17/animatedcollapse.htm
3) Describe problem:
I would like to be able to collapse rows within a table. So instead of having a <div>, I want to put the id on a <tr> tag and have the <tr> tag flip between display:table-row and display:none.
The script almost works as-is, but instead of restoring the row with display:table-row, it restores it with display:block (which would be appropriate for <div> tags, but not <tr> tags).
Would it be possible to get some assistance in adapting the code to detect if the element returned by a particular ID is a <tr> or a <div> and use the appropriate display values?
Note: I do not want to collapse an entire table (otherwise I would just wrap the table in a <div> tag. I want to collapse specific rows in the table.
Note: For reference, here is a link to information on the CSS display tag.
http://www.w3schools.com/css/pr_class_display.asp
Thanks