Javascript滑块未显示和图形提示

Javascript滑块未显示和图形提示,javascript,php,jquery,css,slider,Javascript,Php,Jquery,Css,Slider,我知道我做错了什么,因为我还不懂javascript。我的滑块没有显示在网站上,但其他所有内容都是。这是我的密码: Html Javascript $(document).ready(function () { $(function () { var elephantArr = new Array("", "200", "199", "198", "197",

我知道我做错了什么,因为我还不懂javascript。我的滑块没有显示在网站上,但其他所有内容都是。这是我的密码:

Html

Javascript

$(document).ready(function () {
    $(function () {
        var elephantArr = new Array("",
            "200",
            "199",
            "198",
            "197",
            "196",
            "195",
            "194",
            "193",
            "192",
            "191",
            "190",
            "189");
        var initialValue = 1,
            min = 1,
            max = 200;
        $("#slider").slider({
            value: initialValue,
            min: min,
            max: max,
            step: 1,
            slide: function (event, ui) {
                $("#elephantInfo").val(ui.value);
                $("#elephant").text(elephantArr[ui.value]);
                $("#elephant").css("left", "10px");
            }
        });
        $("#elephantInfo").val(initialValue);
        $("#elephant").text(elephantArr[initialValue]);
        $("#elephant").css("left", "10px");
    });
});
如果有任何关于如何定制滑块外观的提示,我欢迎您的建议


PS:Sry用于错误语言。

Jquery滑块是Jquery UI包的一部分。在当前代码中,多次加载jquery 1.8.3

添加这些行以从jQueryUI中同时包含css和js文件,并且不要忘记删除一个jQueryInclude

<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>


您的问题是什么?PHP是一种服务器端语言,你不能在PHP中制作滑块。你只是回答说。。我想知道是否有任何方法可以用PHP实现它。但是滑块仍然没有出现在我的页面上,我不知道为什么!这里显示的所有代码都不是PHP,所以我不知道您现在到底想做什么。你展示的提琴可以工作,那么到底是什么问题呢?它在提琴上工作,但在我的网站上不工作,也许是我如何在我的页面中插入javascript?我不熟悉PHP和Javascript,但仍然不知道它是如何正确工作的。也许有帮助?
$(document).ready(function () {
    $(function () {
        var elephantArr = new Array("",
            "200",
            "199",
            "198",
            "197",
            "196",
            "195",
            "194",
            "193",
            "192",
            "191",
            "190",
            "189");
        var initialValue = 1,
            min = 1,
            max = 200;
        $("#slider").slider({
            value: initialValue,
            min: min,
            max: max,
            step: 1,
            slide: function (event, ui) {
                $("#elephantInfo").val(ui.value);
                $("#elephant").text(elephantArr[ui.value]);
                $("#elephant").css("left", "10px");
            }
        });
        $("#elephantInfo").val(initialValue);
        $("#elephant").text(elephantArr[initialValue]);
        $("#elephant").css("left", "10px");
    });
});
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>