Created
April 24, 2012 18:44
-
-
Save mustmodify/2482533 to your computer and use it in GitHub Desktop.
Slider Components
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
tr.slider { | |
display: none; | |
} |
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
<table> | |
<tr class="handle"> | |
<td></td> | |
<td></td> | |
</tr> | |
<tr class="slider"> | |
<td colspan="2"> | |
</td> | |
</tr> | |
<tr class="handle"> | |
<td></td> | |
<td></td> | |
</tr> | |
<tr class="slider"> | |
<td colspan="2"> | |
</td> | |
</tr> | |
</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
$(function(){ | |
$('tr.handle input').bind('click', function(event){ | |
event.stopPropagation(); | |
}); | |
$('tr.slider').prev().css('cursor', 'pointer'); | |
$('tr.slider').prev().bind('click', function() { | |
slider_row = $(this).next(); | |
if( slider_row.css('display') == 'none' ) | |
{ | |
slider_row.show(); | |
} | |
else | |
{ | |
slider_row.hide(); | |
} | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment