Jquery 引导滑块未初始化

Jquery 引导滑块未初始化,jquery,twitter-bootstrap,bootstrap-slider,Jquery,Twitter Bootstrap,Bootstrap Slider,我正在尝试从这里使用引导滑块:。但是,我无法初始化滑块。 我的代码片段如下所示: <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="css/bootstrap-switch.min.css" rel="stylesheet"/> <

我正在尝试从这里使用引导滑块:。但是,我无法初始化滑块。 我的代码片段如下所示:

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link href="css/bootstrap-switch.min.css" rel="stylesheet"/>
    <link href="https://raw.githack.com/seiyria/bootstrap-slider/master/css/bootstrap-slider.css" rel="stylesheet" /> 
    <link rel='stylesheet' href='css/jquery-ui.css'>
    <link rel='stylesheet' href='css/ol.css'>
    <script src="js/jquery-ui.js"></script>
    <script src="http://openlayers.org/en/v3.9.0/build/ol.js"></script>
    <script src="js/jquery.ui.widget.js"></script>
    <script src="js/jquery.iframe-transport.js"></script>
    <script src="js/jquery.fileupload.js"></script>
    <script src="https://raw.githack.com/seiyria/bootstrap-slider/master/js/bootstrap-slider.js"></script>    
    <script src="js/bootstrap-switch.min.js"></script>

</head>

<body>
        <input style='width:80px;' class='opacity' type='text' value='' data-slider-min='0' data-slider-max='1' data-slider-step='0.1' data-slider-tooltip='hide'>

    <script type="text/javascript">
        $('input.opacity').slider();
    </script>

</body>
这给我的错误是:

我在这里遗漏了什么?

请再试一次

$(function() {
    $('input.opacity').bootstrapSlider();
});
在文档准备就绪时执行代码

$(function() {
    $('input.opacity').bootstrapSlider();
});