请帮助解决我的问题。我是 jquery ui 的新手。并尝试创建 jquery 滑块: http: //jsfiddle.net/InviS/LYE8B/4/ 但它超出了我的正确位置(参见示例)。我怎样才能限制滑块?
问问题
414 次
1 回答
3
给你:http: //jsfiddle.net/NAC7b/10/。
这有点 hacky,但我将滑块包装在 parent<div>
中,并给滑块的最大宽度为93%
. 这是我更改的 CSS:
#wrapper{
width: 100%;
height: 20px;
background-color: orange;
border-top: 1px solid black;
position: absolute;
left: 0;
top: 129px;
}
#scroll{
width: 93%;
height: 20px;
background-color: orange;
border-top: 1px solid black;
position: relative;
left: -1px;
top: -1px;
}
和 JavaScript:
$('#scroll').slider({animate: true}).bind('slidestop',function(e,ui){
//alert(ui.value);
}).wrap('<div id="wrapper" />');
于 2011-04-19T04:42:32.697 回答