Created
October 18, 2013 06:19
-
-
Save steverob/7037224 to your computer and use it in GitHub Desktop.
Slide Toggle a div below rows of a table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.slidedown-pane-row').hide() | |
$('#rows').on 'click', '.row', -> | |
$(this).next('.slidedown-pane-row').slideToggle(500) | |
false | |
$('#rows').on 'click', '.row', -> | |
$(this).next('.slidedown-pane-row').find('div').slideToggle(500) | |
false | |
#Markup | |
<table> | |
<tbody id='rows'> | |
<tr class='row'> | |
<td>Foo</td> | |
<td>Bar</td> | |
</tr> | |
<tr class='slidedown-pane-row'> | |
<td colspan="2"> | |
<div> | |
Foo Bar More information Pane | |
</div> | |
</td> | |
</tr> | |
<tr class='row'> | |
<td>Hello</td> | |
<td>World</td> | |
</tr> | |
<tr class='slidedown-pane-row'> | |
<td colspan="2"> | |
<div> | |
Hello World More information Pane | |
</div> | |
</td> | |
</tr> | |
</tbody> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment