Select 框全屏 jquery bootstrap
Select box fullscreen jquery bootstrap
找到手机全屏selextbox的方法
http://craftpip.github.io/bootstrap-fullscreen-select/
但是当我在 select 框上添加表单操作并单击 select 选项时,弹出窗口会打开,在我选择一些值之前它会直接重定向到表单操作。
知道我该如何解决这个问题吗?
<link href="http://www.jqueryscript.net/demo/Mobile-First-Fullscreen-Select-Replacement-with-jQuery-Bootstrap/css/bootstrap-fullscreen-select.css" rel="stylesheet" type="text/css">
<form action="index.html">
<select class="form-control example-1" >
<option value="JavaScript">JavaScript</option>
<option value="C++">C++</option>
<option value="Swift">Swift</option>
<option value="Ruby">Ruby</option>
<option value="Python">Python</option>
</select>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="http://www.jqueryscript.net/demo/Mobile-First-Fullscreen-Select-Replacement-with-jQuery-Bootstrap/js/bootstrap-fullscreen-select.js"></script>
<script>
$('.example-1').mobileSelect();
$('.example-2').mobileSelect({theme: 'holo',style: 'btn-danger'});
$('.example-3').mobileSelect({theme: 'mac', animation: 'zoom'});
</script>
有趣的是,我从来没有使用过这个插件,所以我不得不深入研究一下源代码。无论如何,您的本机选择正在转换为按钮。表单中的按钮将提交。将此代码段添加到您自己的 js 文件中。
$(document).ready(function(){
$('.btn-mobileSelect-gen').attr('type', 'button');
});
我在这里分叉了你的 fiddle - working demo
找到手机全屏selextbox的方法
http://craftpip.github.io/bootstrap-fullscreen-select/
但是当我在 select 框上添加表单操作并单击 select 选项时,弹出窗口会打开,在我选择一些值之前它会直接重定向到表单操作。
知道我该如何解决这个问题吗?
<link href="http://www.jqueryscript.net/demo/Mobile-First-Fullscreen-Select-Replacement-with-jQuery-Bootstrap/css/bootstrap-fullscreen-select.css" rel="stylesheet" type="text/css">
<form action="index.html">
<select class="form-control example-1" >
<option value="JavaScript">JavaScript</option>
<option value="C++">C++</option>
<option value="Swift">Swift</option>
<option value="Ruby">Ruby</option>
<option value="Python">Python</option>
</select>
</form>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script src="http://www.jqueryscript.net/demo/Mobile-First-Fullscreen-Select-Replacement-with-jQuery-Bootstrap/js/bootstrap-fullscreen-select.js"></script>
<script>
$('.example-1').mobileSelect();
$('.example-2').mobileSelect({theme: 'holo',style: 'btn-danger'});
$('.example-3').mobileSelect({theme: 'mac', animation: 'zoom'});
</script>
有趣的是,我从来没有使用过这个插件,所以我不得不深入研究一下源代码。无论如何,您的本机选择正在转换为按钮。表单中的按钮将提交。将此代码段添加到您自己的 js 文件中。
$(document).ready(function(){
$('.btn-mobileSelect-gen').attr('type', 'button');
});
我在这里分叉了你的 fiddle - working demo