基本上你想要的幻灯片活动期间进行更改,在不久的功能是,在该事件发生回调。 anon函数的第一个参数是包含您想要从幻灯片小部件中获取的信息的事件。
http://jsfiddle.net/8E9M8/
var i18n = {
1: "My first position",
2: "My second position",
3: "My third position",
4: "My forth position",
5: "My fifth position",
6: "My sixth position",
7: "My seventh position",
8: "My eight position",
9: "My nineth position",
10: "My tenth position"
};
$(function(){
$('#slider_surface').slider()
.on('slide', function(ev){
console.log(ev);
$('.score_number h3').html(ev.value.toString());
$('.score_text p').html(i18n[ev.value]);
});
});
完美!谢谢你的帮助 – user2910809