当我在它自己的 html 文件中运行它时,我有以下代码可以正常工作。但是,当我将其用作较大网页的一部分时,滑块可见但不会移动。
这是我的 javascript
$("#slider").slider({
range: false,
min: 0,
max: 10, step: 1
});
HTML
<div id="slider"></div>
这也是我所有的内容。从我收集的内容来看,它一定是与另一个 js 文件发生冲突。
<script type="text/javascript" src="Scripts/jquery.js" ></script>
<script type='text/javascript' src="Scripts/jquery-ui.js"></script>
//the one above is the new one, that is references by the slider
<script type='text/javascript' src='Scripts/modernizr-2.5.3.js'></script>
<script type='text/javascript' src='Scripts/jquery.mobilemenu.js?ver=1.0'></script>
<script type='text/javascript' src='Scripts/si.files.js?ver=1.0'></script>
<script type="text/javascript" src="Scripts/jquery.uploadify-3.1.min.js"></script>
<script type="text/javascript" src="Scripts/swfobject.js"></script>
<script type="text/javascript" src="Scripts/fullcalendar.js"></script>
<script type="text/javascript" src="Scripts/jquery.simplemodal.js"></script>