您可以使用Jquery Mobile庫(http://jquerymobile.com/demos/1.0rc2/docs/forms/slider/)中的滑塊獲取基本滑塊功能,然後使用範圍更改背景。例如:
// if backgrounds are equally spread on the slider then you can just
// divide slider value to the number of backgrounds and round the results
var range = Math.round(your_range_from_slider/number_of_backgrounds);
// then change background to the one you need. For example
// in you named backgrounds background_1.jpg, background_2.jpg, etc.
// And element to which you want to set it have id="bg"
$("#bg").css("background-color", "background_" + range + ".jpg");
要了解更多有關JQuery的語法使用http://docs.jquery.com/Main_Page(趕上滑塊的變化,你可能需要使用的變化()事件http://api.jquery.com/change/)。