问题描述
|
帮助请解决我的问题。我是jquery ui中的newby。并尝试创建jquery滑块:
http://jsfiddle.net/InviS/LYE8B/4/
但这超出了我在正确位置上的位置(请参见示例)。我如何限制滑块?
解决方法
在这里,您可以访问:http://jsfiddle.net/NAC7b/10/。
有点古怪,但是我将滑块包装在父对象“ 0”内,并给滑块设置了最大宽度
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\" />\');