如何在jQuery UI中編寫滑塊以使其生效?使用live()製作jQuery UI滑塊
Here's代碼:
//scrollpane parts
var scrollPane = $('.scroll-pane');
var scrollContent = $('.scroll-content');
//build slider
var scrollbar = $(".slider-vertical").slider({
orientation: "vertical",
value: "100",
slide:function(e, ui){
if(scrollContent.height() > scrollPane.height()){ scrollContent.css('margin-top', Math.round((100 - ui.value)/100 * (scrollPane.height() - scrollContent.height())) + 'px'); }
else { scrollContent.css('margin-top', 0) }
}
});
我需要讓生活()
感謝朋友。這很棒。 – DeryckOE 2010-05-24 15:47:59