jquery - Setting Nivo Slider background-position property on individual slides -


i'm using jquery nivo slider. want set background-position property div#slider element each individual slide.

i presume use switch this:

    switch(vars.currentslide)         {         case 0:             slider.css('background-position', '-201px 0px');             break;         case 1:             slider.css('background-position', '-45px 0px');             break;         case 2:                      slider.css('background-position', '-192px 0px');             break;         case 3:             slider.css('background-position', '-93px 0px');             break;         case 4:             slider.css('background-position', '-32px 0px');             break;         case 5:             slider.css('background-position', '-254px 0px');             break;         default:             slider.css('background-position', '-201px 0px');         }; 

is correct, , put switch in nivo slider javascript? if not, can please advise how?

on link page can see did initial slide, , works in first instance (line 97 of nivo js file.)


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -