<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="gb2312">
<title>jQuery滑块插件nstSlider.js</title>
<!-- 1. Include CSS -->
<link type="text/css" rel="stylesheet" href="css/jquery.nstSlider.css">
</head>
<body><center>
<h1>jQuery滑块插件nstSlider.js</h1><br>
<!-- 2. Write markup for the slider -->
<div class="nstSlider"
data-range_min="0" data-range_max="100"
data-cur_min="10" data-cur_max="90"> <!-- 2.1. add data attributes for the range: the min/max values the user can select -->
<!-- 2.2. add the slider values: the initial values within the range the grips should be initially set at -->
<div class="highlightPanel"></div> <!-- 2.3. (optional) you can use this in combination
with highlight_range if you need to, or
you can just omit it. Also, you can move
this element after as well if you want to
highlight above the slider grips -->
<div class="bar"></div> <!-- 2.4. (optional) this is the bar that fills the
area between the left and the right grip -->
<div class="leftGrip"></div> <!-- 2.5 the left grip -->
<div class="rightGrip"></div> <!-- 2.6 (optional) the right grip. Just omit if
you don't need one -->
</div>
<!-- These two are actually exernal to the plugin, but you are likely to need them... the plugin
does the math, but it's up to you to update the content of these two elements. -->
<div class="leftLabel"></div>
<div class="rightLabel"></div>
</center>
<!-- 3. Add jQuery -->
<script src="js/jquery-1.11.0.min.js"></script>
<!-- 4. Add nstSlider.js after jQuery -->
<script src="js/jquery.nstSlider.min.js"></script>
<!-- 5. setup the slider! -->
<script>
$('.nstSlider').nstSlider({
"left_grip_selector": ".leftGrip",
"right_grip_selector": ".rightGrip",
"value_bar_selector": ".bar",
"highlight": {
"grip_class": "gripHighlighted",
"panel_selector": ".highlightPanel"
},
"value_changed_callback": function(cause, leftValue, rightValue) {
$('.leftLabel').text(leftValue);
$('.rightLabel').text(rightValue);
},
});
// Call methods and such...
var highlightMin = Math.random() * 20,
highlightMax = highlightMin + Math.random() * 80;
$('.nstSlider').nstSlider('highlight_range', highlightMin, highlightMax);
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>
</body>
</html>
一款支持鼠标拖动的jQuery滑块插件nstSlider.zip
版权申诉
7 浏览量
2022-11-10
02:23:42
上传
评论
收藏 55KB ZIP 举报
毕业_设计
- 粉丝: 1921
- 资源: 1万+
最新资源
- 基于Android的学生信息管理2.rar
- 3e9ef566-ba13-47b0-a252-77aa9e4b040f8412130.apk
- 毕业设计基于SSM的房屋租赁系统源【源码+lw+部署+讲解】
- 基于Android男装出口管理系统的app.rar
- 工资表生成工资条Excel模版
- 位运算、状态压缩、枚举子集汇总.html
- C++毕业设计快递分拣机器人系统源码+论文文件+资料.zip
- 锐龙处理器 体质分析工具,体质越好越稳定,越容易超频 tool1007/Win V/F
- IOS Swift3 四种单例模式详解及实例《PPT文档》
- Swin-Unet网络预训练模型,swin-tiny-patch-window7-224.pth
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈