如何使用select2引导程序 [英] how to use select2 bootstrap
本文介绍了如何使用select2引导程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
使用bootsrap v3.3.6在select2即时消息上即时消息
im new at select2 im using bootsrap v3.3.6
如何插入select2引导程序? 我已经输入
how to plugin the select2 bootstrap? i already input
<link href="css/select2.css" rel="stylesheet">
<link href="css/select2-bootstrap.css" rel="stylesheet">
<select id="position" style="width: 15%">
<option value=""></option>
<option>One</option>
<option>Two</option>
<script src="js/select2.js"></script>
$("#position").select2({
allowClear:true,
placeholder: 'Position'
});
,但是输出仍然像默认的select2一样.不喜欢引导程序,请帮助
but the output still like the default select2. not like bootstrap, please help
推荐答案
$("#position").select2(..)
实例应位于script
标记内.确保关闭select
标记.确保正确引用了select2.css和select2.js,并且浏览器控制台中没有错误.
The $("#position").select2(..)
instance should be inside script
tags. Make sure you close the select
tag. Make sure you're properly referencing the select2.css and select2.js and that there are no errors in the browser console.
http://codeply.com/go/YNg1JSaysI
这篇关于如何使用select2引导程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文