【发布时间】:2011-03-14 01:53:53
【问题描述】:
如何让滑块与 jQuery 一起使用。
HTML:
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
</head>
<body>
<div id='example1' class='ui-slider-1' style="margin: 40px;">
<div class='ui-slider-handle'></div>
</div>
</body>
CSS:
.ui-slider-handle {
border:1px solid silver;
height:10px;width:10px;
background-color:black;
}
#example1 {
width:1050px;
background-color:white;
border:1px solid black;
}
jQuery:
$('#example1').slider( { minValue: -100, maxValue: 100 } );
如果您需要更多代码,请告诉我。我做错了什么?
【问题讨论】: