jQuery酷炫黑色下拉框选择特效代码下载


jQuery酷炫黑色下拉框选择特效代码下载
jQuery酷炫黑色下拉框选择特效代码下载以及酷炫黑色、下拉框选择等js/jquery网页特效代码下载。

1. 引入CSS

<link rel="stylesheet" href="css/select.css">

2. 引入JS

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/select2.js"></script>

3. HTML代码

<div class="m">
	<div class=" selectPickerWrapper showYear" data-checks="1,2,3" data-model="Year" > 
		<select class="hidden"></select>
	</div>
	<div class="selectPickerWrapper showCity" data-model="City"> 
		<select class="hidden">
			<option value="1">万源路</option>
			<option value="2">漕宝路666号</option>
			<option value="3">古美街道</option>
			<option value="4">平南路888号</option>
			<option value="5">合川路</option>
			<option value="6">莲花路4545号</option>
		</select>
	</div> 
</div>
<script type="text/javascript">
	$(function() {
		var map = [{"text":"2020","val":"1"},{"text":"2019","val":"2"},{"text":"2018","val":"3"},{"text":"2017","val":"4"}];
		$(".showYear").data("init",JSON.stringify(map));
		$(".showYear").mySelect({
			showCancel:true,
			showSearch:true,
			multiple:true
		});
		$(".showCity").mySelect({
			showCancel:false,
			showSearch:true,
			multiple:false
		});
		console.log(JSON.stringify(map));
	});
</script>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>

相关推荐

发表评论

相关文章