Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/89.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 努力让引导触针正常工作_Jquery_Html_Twitter Bootstrap - Fatal编程技术网

Jquery 努力让引导触针正常工作

Jquery 努力让引导触针正常工作,jquery,html,twitter-bootstrap,Jquery,Html,Twitter Bootstrap,我正在尝试使用引导触针选择器将数字选择器添加到联系人表单中。我基本上犯了一些我看不见的错误,+/-按钮不起作用……有人能指出正确的方向吗?以下是从容器流体开始的代码: <div class="container-fluid"> <div class="row drop"> <div class="container"> <div class="col-md-4"> <label for="demo1"> Example wit

我正在尝试使用引导触针选择器将数字选择器添加到联系人表单中。我基本上犯了一些我看不见的错误,
+/-
按钮不起作用……有人能指出正确的方向吗?以下是从容器流体开始的代码:

<div class="container-fluid">
<div class="row drop">
<div class="container">
<div class="col-md-4">

<label for="demo1">
    Example with postfix (large):
</label>
<div class="input-group bootstrap-touchspin">
<span class="input-group-btn">
<button class="btn btn-default bootstrap-touchspin-down" type="button">
    -
</button>

</span>
<span class="input-group-addon bootstrap-touchspin-prefix" style="display: none;"></span>

<input id="demo1" class="form-control" type="text" name="demo1" value="55" style="display: block;"></input>

<span class="input-group-addon bootstrap-touchspin-postfix">
    %
</span>
<span class="input-group-btn">

<button class="btn btn-default bootstrap-touchspin-up" type="button">
    +
</button>
</div>    
</div>
</div>
</div>
</div>
<div class="container-fluid footer">
</div>

<script>
        $("input[name='demo1']").TouchSpin({
            min: 0,
            max: 100,
            step: 0.1,
            decimals: 2,
            boostat: 5,
            maxboostedstep: 10,
            postfix: '%'
        });
    </script>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.bootstrap-touchspin.min.js"></script>

带有后缀的示例(大):
-
%
+
$(“输入[name='demo1'])。触针({
分:0,,
最高:100,
步骤:0.1,
小数:2,
boostat:5,
maxboostedstep:10,
后缀:''
});

您需要使用include脚本来超越内联JavaScript代码

<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.bootstrap-touchspin.min.js"></script>
<script>
    $("input[name='demo1']").TouchSpin({
        min: 0,
        max: 100,
        step: 0.1,
        decimals: 2,
        boostat: 5,
        maxboostedstep: 10,
        postfix: '%'
    });
</script>

$(“输入[name='demo1'])。触针({
分:0,,
最高:100,
步骤:0.1,
小数:2,
boostat:5,
maxboostedstep:10,
后缀:''
});

非常感谢您-我会记住这一点以备将来参考。非常感谢你的帮助!