I have a list of states that displays or hides on click of a button using jquery slideUp()
and sideDown()
functions.
I'm trying to use jquery tinyscrollbar to add a custom scrollbar to it.
I have a jsfiddle here: http://jsfiddle.net/ByteMyPixel/acLch/
I almost have it working, but am stuck - the tinyscrollbar shows on the second click event/slideUp()
instead of slideDown()
.
Any ideas on how to fix this so that the tinyscrollbar appears on slideDown()
, and disappears on slideUp()
?
Here is my code:
var oScrollbar1 = $('#scrollbar1');
oScrollbar1.tinyscrollbar();
$("a.button").click(function () {
oScrollbar1.tinyscrollbar_update();
if ($("ul.scrolling").is(":hidden")) {
$("ul.scrolling").slideDown("slow");
} else {
$("ul.scrolling").slideUp("slow");
}
});