0

JQRangeSlider 似乎有一些问题。试图将此工具实现到 MVC 项目中。在调用滑块后,永远不会到达警报。有错误吗?我在 Dreamweaver 的另一个项目中工作,虽然它在实时预览模式下呈现良好,但无法将它带到任何浏览器。这是我的代码...

    ViewBag.Title = "Test";
    Layout = "";
    }

<html>
<head>
<title>"Slider"</title>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/start/jquery-           ui.css" rel="stylesheet" type="text/css" />
    <link href="@Url.Content("~/Content/slider/CSS/classic.css")" rel="stylesheet"   type="text/css" />



    <script src="@Url.Content("http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js")" type="text/javascript"></script>
    <script src="../../Content/slider/Scripts/jquery-ui-1.8.22.custom.min.js" type="text/javascript"></script>

    <script src="@Url.Content("~/Content/slider/Scripts/jQRangeSliderMouseTouch.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQRangeSliderDraggable.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQRangeSliderBar.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQDateRangeSliderHandle.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQRangeSliderLabel.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQEditRangeSliderLabel.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQRangeSlider.js")" type="text/javascript"></script>
    <script src="@Url.Content("~/Content/slider/Scripts/jQEditRangeSlider.js")" type="text/javascript"></script>
</head>


<body>

<div class="page-header">
    <h2>Test</h2>

</div>
<div id="slider" style="width:200px;"></div>
<input type="text" class="datepicker" />

<script type="text/javascript">
    $(function () {

        $("#slider").editRangeSlider();
        alert("whocareswhateverbye");

    });

</script>
</body>
</html>
4

1 回答 1

0

我认为你的代码失败了

 $("#slider").editRangeSlider();

由于与 jQuery 1.7 的兼容性问题,所以它永远不会达到警报。

它与 jQuery 1.8 一起工作正常,如下所示:

http://jsfiddle.net/QwAqy/1/

于 2013-06-26T06:35:59.983 回答