今天要为大家带来一款非常实用的jquery列表筛选插件,效果非常好。单击某项的时候动画筛选该项的列表。我们一起看下效果图:

在线预览   源码下载

我们一起看下实现的代码:

html代码:

<div class="row">
<div class="small-12 columns small-centered">
<fieldset class="controls">
<div class="row">
<!-- filter buttons -->
<div class="small-9 columns" id="controlsfilter">
<button class="filter tiny round active" data-filter="all">
全部</button>
<button class="filter tiny round" data-filter=".newyork">
诱惑</button>
<button class="filter tiny round" data-filter=".california">
清纯</button>
<button class="filter tiny round" data-filter=".texas">
明星</button>
</div>
<!-- layout buttons -->
<div class="small-3 columns" id="controlslayout">
<label>
Layout:</label>
<div class="controlslayout">
<input type="radio" class="grid" checked="checked" name="layout" id="grid"><label
id="labelgrid" for="grid"><i class="fa fa-th"></i></label><input type="radio" class="list"
name="layout" id="list"><label id="labellist" for="list"><i class="fa fa-bars"></i></label></div>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<!-- container for images -->
<div class="small-12 columns small-centered">
<div class="container" id="Container">
<ul class="small-block-grid-3 medium-block-grid-4 large-block-grid-5">
<li class="mix newyork" style="display: inline-block;">
<img border="0" src="imgs/a1.jpg"></li>
<li class="mix newyork" style="display: inline-block;">
<img border="0" src="imgs/a5.jpg"></li>
<li class="mix california" style="display: inline-block;">
<img border="0" src="imgs/b1.jpg"></li>
<li class="mix newyork" style="display: inline-block;">
<img border="0" src="imgs/a4.jpg"></li>
<li class="mix texas" style="display: inline-block;">
<img border="0" src="imgs/c1.jpg"></li>
<li class="mix newyork" style="display: inline-block;">
<img border="0" src="imgs/a2.jpg"></li>
<li class="mix newyork" style="display: inline-block;">
<img border="0" src="imgs/a3.jpg"></li>
<li class="mix california" style="display: inline-block;">
<img border="0" src="imgs/b2.jpg"></li>
<li class="mix california" style="display: inline-block;">
<img border="0" src="imgs/b3.jpg"></li>
<li class="gap"></li>
<li class="gap"></li>
</ul>
</div>
</div>
</div>

css代码:

    /** Controls **/
.controls
{
padding: 0.5em 0.25em 0.5em 1em;
-webkit-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
-goog-ms-box-shadow: 0 0 20px rgba(0, 0, 0, .2);
box-shadow: 0 0 20px rgba(0, 0, 0, .2);
-moz-border-radius:;
} .filter, .controlslayout label
{
background: #33cccc;
} button, .button
{
margin-bottom: 0.5em;
outline: none;
} .controls button.active, .controlslayout input[type="radio"]:checked + label
{
background: #007295;
} #controlslayout input[type="radio"]
{
visibility: hidden;
height:;
width:;
} #controlslayout input[type="radio"] + label
{
margin:;
} .controlslayout
{
display: block;
} #controlslayout .fa
{
font-size: 1.5em;
color: #ffffff;
} #labelgrid
{
border-radius: 1000px 0 0 1000px;
padding-top: 0.5rem;
padding-right: .75rem;
padding-bottom: 0.3rem;
padding-left: 1rem;
} #labellist
{
border-radius: 0 1000px 1000px 0;
padding-top: 0.5rem;
padding-right: 1rem;
padding-bottom: 0.3rem;
padding-left: .75rem;
} /** Container **/
#Container .mix
{
display: none;
} #Container .large-block-grid-5 > li:nth-of-type(5n+1), #Container .large-block-grid-5 > li:nth-of-type(1n)
{
clear: none;
}

js代码:

 $('#Container').mixItUp();
}); $('input').on('click', function () {
if ($(this).hasClass('grid')) {
$('#Container ul').removeClass('small-block-grid-1').addClass('small-block-grid-3 medium-block-grid-4 large-block-grid-5');
}
else if ($(this).hasClass('list')) {
$('#Container ul').removeClass('small-block-grid-3 medium-block-grid-4 large-block-grid-5').addClass('small-block-grid-1');
}
}); //@ sourceURL=pen.js

注:本文爱编程原创文章,转载请注明原文地址:http://www.w2bc.com/Article/5794

jquery超炫的列表筛选插件的更多相关文章

  1. 一款基于jquery超炫的图片切换特效

    今天为给大家介绍一款基于jquery超炫的图片切换特效.由百叶窗飞入显示图片.图片消息的时候也是百叶窗渐行渐远.用于图片展示,效果还是非常好,我们一起看下效果图: 在线预览   源码下载 来看下实现的 ...

  2. 一款基jquery超炫的动画导航菜单

    今天给大家分享一款基jquery超炫的动画导航菜单.这款导航菜单,初始时页面中间一个按钮,单击按钮,菜单从左侧飞入页中.再次单击按钮,导航飞入左侧消息.动画效果很非常炫.一起看下效果图: 在线预览   ...

  3. 一款基于jquery超炫的弹出层提示消息

    今天给大家带来一款基于jquery超炫的弹出层提示消息.这款实例页面初始时,一个go按钮.当单击go按钮时,提示强出层以动画形式出现.效果图如下: 在线预览   源码下载 实现的代码. html代码: ...

  4. 程序猿必备的10款超炫酷HTML5 Canvas插件

    1.超炫酷HTML5 Canvas 3D旋转地球动画 这是一款基于HTML5 Canvas的3D地球模拟动画,动画以太空作为背景,地球在太空中旋转,同时我们也可以拖拽鼠标来从不同的角度观察地球.另外我 ...

  5. jQuery超炫酷按钮插件及源码

    现在大部分网页的按钮都是经过美化的,那些原始的浏览器按钮太过于枯燥乏味,让用户失去和网站交互的兴趣.早期我们都是通过背景图片来美化网页按钮,而现在我们可以利用扩展性更好的CSS3来制作漂亮的网页按钮, ...

  6. 快速设置超炫banner,js插件

    http://www.themepunch.com/codecanyon/revolution_wp/ 记录一下以后用 //出自http://www.cnblogs.com/ahjesus 尊重作者辛 ...

  7. 8个超炫酷的jQuery相册插件欣赏

    在网页中,相册应用十分常见,如果你经常逛一些社交网站,那么你应该会注意到很多各式各样的网页相册应用.今天我们要来分享一些最新收集的jQuery相册插件,这些精美的jQuery相册插件可以帮助你快速搭建 ...

  8. 超炫的时间轴jquery插件Timeline Portfolio

    Timeline Portfolio是一款按时间顺序专业显示事件的jquery时间轴插件,可以根据时间的先后嵌入各种媒体包括微博,视频和地图等.这个展现的模式非常适合设计师的作品集和个人简历的展示.T ...

  9. 超炫酷的jQuery/HTML5应用效果及源码

    jQuery非常强大,我们之前也用jQuery分享过很多实用的插件.HTML5可以让网页变得更加绚丽多彩,将HTML5和jQuery结合使用那将发挥更棒的效果. 今天向大家收集了一些关于HTML5和j ...

随机推荐

  1. SET GLOBAL FOREIGN_KEY_CHECKS取消外键约束

    今天在工作中遇到的问题,在删除一个表时报错,发现有外键约束,所以不能删除,查了下发现需要取消外键约束. SET GLOBAL FOREIGN_KEY_CHECKS=0;全局取消外键约束 SET SES ...

  2. Move semantics(C++11)

    /*  * Compile with:   *       g++ move_test.c -o move_test -std=c++11 -g -fno-elide-constructors  * ...

  3. jquery添加用户 事例

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <hea ...

  4. JS版的Server.UrlEncode

    <script>function (str) {//标准UrlEncode.execScript("function reHex(str)\reHex=hex(asc(str)) ...

  5. MySQL主从同步的一个小问题解决

    由于历史遗留问题,我们的MySQL主从库的表结构不一致,主库的某个表tableA比从库表tableA少了一个字段. 当尝试在主库上更改表结构时,这行alter语句会随着binlog同步到从库,如果从库 ...

  6. Fork me on GitHub

    <a href="https://github.com/yadongliang"><img style="position: absolute; top ...

  7. Python 的 pass 语句

    Python pass是空语句,是为了保持程序结构的完整性. pass 不做任何事情,一般用做占位语句. 例子1: if __name__ == '__main__': pass 例子2: # 输出 ...

  8. 【LeetCode】127. Word Ladder

    Word Ladder Given two words (start and end), and a dictionary, find the length of shortest transform ...

  9. Windows下面安装和配置Solr 4.9(二)

    将Solr和Tomcat结合: 1.在D盘下创建目录 D:\Demos\Solr 2.解压solr-4.9.0文件,我这里下载的是这个4.9版本,将example文件夹下的solr文件夹中的所有文件( ...

  10. python学习笔记——mongodb数据库

    1 概述 1.1 文件管理阶段 优点:可以长期保存 能存储大量数据 缺点:没有结构化的组织 查找不方便 数据容易冗余 1.2 数据库管理阶段 有文件存储的优点,同时解决了文件存储的问题 缺点 : 操作 ...