jquery分类图片过滤器插件代码



145 578 193



特效描述:jquery 分类图片 过滤器插件,jquery图片过滤器,支持分类、标题搜索、排序、移动效果等图片过滤方式。一款比较实用的图片过滤插件下载

代码结构

1. 引入CSS

<link href="http://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/demo.css">
<link rel="stylesheet" href="css/index.css">

2. 引入JS

<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.2/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script src="js/jquery.filterizr.min.js"></script>
<script src="js/controls.js"></script>

3. HTML代码

	<div class="container" style="background: #fff;padding: 2em;">
		<!-- Filter Controls - Simple Mode -->
		<div class="row">
			<!-- A basic setup of simple mode filter controls, all you have to do is use data-filter="all"
			for an unfiltered gallery and then the values of your categories to filter between them -->
			<ul class="simplefilter">
				简单过滤器控件:
				<li class="active" data-filter="all">全部</li>
				<li data-filter="1">城市</li>
				<li data-filter="2">乡村</li>
				<li data-filter="3">工业</li>
				<li data-filter="4">日光</li>
				<li data-filter="5">夜景</li>
			</ul>
		</div>
		<!-- Filter Controls - Multifilter Mode -->
		<div class="row">
			<!-- A basic setup of multifilter controls, when the user toggles a category
			the corresponding items are rendered or hidden -->
			<ul class="multifilter">
				滤波器控制:
				<li data-multifilter="1">城市</li>
				<li data-multifilter="2">乡村</li>
				<li data-multifilter="3">工业</li>
			</ul>
		</div>
		<!-- Shuffle & Sort Controls -->
		<div class="row">
			<ul class="sortandshuffle">
				排序 &amp; 移动 控制:
				<!-- Basic shuffle control -->
				<li class="shuffle-btn" data-shuffle>Shuffle</li>
				<!-- Basic sort controls consisting of asc/desc button and a select -->
				<li class="sort-btn active" data-sortAsc>Asc</li>
				<li class="sort-btn" data-sortDesc>Desc</li>
				<select data-sortOrder>
					<option value="domIndex">
						Position
					</option>
					<option value="sortData">
						Description
					</option>
				</select>
			</ul>
		</div>
		<!-- Search control -->
		<div class="row search-row">
			关键字搜索:
			<input type="text" class="filtr-search" name="filtr-search" data-search>
		</div>
		<div class="row">
			<!-- This is the set up of a basic gallery, your items must have the categories they belong to in a data-category
			attribute, which starts from the value 1 and goes up from there -->
			<div class="filtr-container">
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="1, 5" data-sort="Busy streets">
					<img class="img-responsive" src="img/city_1.jpg" alt="sample image">
					<span class="item-desc">Busy Streets</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="2, 5" data-sort="Luminous night">
					<img class="img-responsive" src="img/nature_2.jpg" alt="sample image">
					<span class="item-desc">Luminous night</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="1, 4" data-sort="City wonders">
					<img class="img-responsive" src="img/city_3.jpg" alt="sample image">
					<span class="item-desc">city wonders</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="3" data-sort="In production">
					<img class="img-responsive" src="img/industrial_1.jpg" alt="sample image">
					<span class="item-desc">in production</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="3, 4" data-sort="Industrial site">
					<img class="img-responsive" src="img/industrial_2.jpg" alt="sample image">
					<span class="item-desc">industrial site</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="2, 4" data-sort="Peaceful lake">
					<img class="img-responsive" src="img/nature_1.jpg" alt="sample image">
					<span class="item-desc">peaceful lake</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="1, 5" data-sort="City lights">
					<img class="img-responsive" src="img/city_2.jpg" alt="sample image">
					<span class="item-desc">city lights</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="2, 4" data-sort="Dreamhouse">
					<img class="img-responsive" src="img/nature_3.jpg" alt="sample image">
					<span class="item-desc">dreamhouse</span>
				</div>
				<div class="col-xs-6 col-sm-4 col-md-3 filtr-item" data-category="3" data-sort="Restless machines">
					<img class="img-responsive" src="img/industrial_3.jpg" alt="sample image">
					<span class="item-desc">restless machines</span>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	$(function() {
		$('.filtr-container').filterizr();
	});
	</script>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动切换 滚动条切换 滑动选项卡 滑动切换 flash焦点图 flash幻灯片 flashbanner flash图片轮播 选项卡切换 选项卡 切换 tab切换 页面切换 选项卡插件 切换插件 滑动手风琴 切换按钮 表单 表单美化 表单插件 表单美化插件 焦点图 幻灯片 轮播图 bar焦点图 带标题的焦点图 文本框 text文本框 下拉框 select下拉菜单 select美化 select美化框 选项卡自动切换 搜索框 筛选 筛选器

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到