When i click the link to make the content (TABLE) visible, it jumps open then collapse and then slides down.
Closing the content is not an issue, it slides up normally.
JS1
$(".toggleContent1").hide();
$(".toggleTrigger").toggle(function(){
$(this).html("hide...");
$("."+$(this).attr("rel")).slideDown(1000);
//alert(1);
}, function () {
$(this).html("more...");
$("."+$(this).attr("rel")).slideUp(1000);
//alert(2);
});
JS2
$(".toggleContent1").hide();
//Switch the "Open" and "Close" state per click
$(".toggleTrigger").toggle(function(){
$(this).html("hide...");
}, function () {
$(this).html("more...");
});
//Slide up and down on click
$(".toggleTrigger").click(function(){
$("."+$(this).attr("rel")).slideToggle("slow");
return false;
});
HTML
<table class="toggleContent1">
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
<tr><td>Row 5</td></tr>
<tr><td>Row 6</td></tr>
<tr><td>Row 7</td></tr>
<tr><td>Row 8</td></tr>
<tr><td>Row 9</td></tr>
<tr><td>Row 10</td></tr>
<tr><td>Row 11</td></tr>
</table>
<a href="#" rel="toggleContent1" class="toggleTrigger">more...</a>
Thanks