我正在尝试将此滑块合并到我的网页上:
http://ionden.com/a/plugins/ion.rangeSlider/en.html
他们的示例脚本在下载时运行良好。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Ion.RangeSlider - test</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/ion.rangeSlider.css" />
<link rel="stylesheet" href="css/ion.rangeSlider.skinFlat.css" />
</head>
<body>
<!-- Page contents -->
<div style="position: relative; padding: 200px;">
<div>
<input type="text" id="range" value="" name="range" />
</div>
</div>
<!-- All JS -->
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/ion.rangeSlider.js"></script>
<script>
$(function () {
$("#range").ionRangeSlider({
hide_min_max: true,
keyboard: true,
min: 0,
max: 5000,
from: 1000,
to: 4000,
type: 'double',
step: 1,
prefix: "$",
grid: true
});
});
</script>
</body>
</html>
此示例可在以下网址下载:http: //ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.6.zip
在 Plnkr 上复制相同的脚本会导致错误: http ://plnkr.co/edit/wUsGWwMSTczI8A4GVWrp?p=info
控制台中显然没有抛出错误。