jQuery slider widget background -- change dynamicaly
- by publicRavi
I use a custom background for my slider by overriding the CSS:
.ui-widget-content {background: transparent url(../img/bg.png) no-repeat;}
Slider's behavior is controlled by:
$(document).ready(function() {
$(".myslider5").slider({
animate: "true",
step: 1,
min: -1950,
max: 1950,
value: 0,
slide: function(event, ui) {
// magic happens here
}
});
There is a need for me to use 2 different classes for my slider DIV, based on some logic. So, myslider5 and myslider3 are the two classes. But their background images need to change too. How do I go about doing this?