Explaining this may be a bit tricky, but here we go... I have multiple hidden divs that switch with each other when a link is clicked using
$(document).ready(function(){
$('a').click(function () {
var divname= this.name;
$("#"+divname).show("slow").siblings().hide("slow");
});
});
I also have a slider function that works perfectly. However, when the div changes, the slider stops working. How can I make it target the hidden divs when they are displayed? Is it related to variables?
This is my slider code:
$(function() {
var scrollPane = $('#info'),
scrollableHeight = scrollPane.height() - scrollPane.parent().height() || 0;
$("#slider-vertical").slider({
orientation: "vertical",
range: "max",
min: 0,
max: scrollableHeight,
value: scrollableHeight,
slide: function(event, ui) {
scrollPane.css({top: ui.value - scrollableHeight});
}
});
});
To better understand, here is a link to a working example (please excuse the messy code):
Thank you in advance.