jQuery演示8种不同的瀑布流效果

jQuery演示8种不同的瀑布流效果

本文演示了8种不同的瀑布流加载效果,有Lightbox、动态加载图片、图片占位、图片排序等不同的瀑布流加载图片演示。所有的瀑布流效果都是由wookmark来完成,其中有滚动条加载,也就是无限加载,参考《Infinite-Scroll无限滚动加载数据教程》:http://www.sucaiq.com/texiao/108.html

淘建站为您提供更多_图片代码_延迟加载_瀑布流_排序,在此特别感谢您对我们的支持与厚爱!

查看演示

演示不了,点击反馈

加入收藏

下载 298 次

打赏作者

觉得不错,可打赏下作者

下载资源

免费共享

特别说明:本站资源来自网友发布分享,仅供学习与参考,请勿用于商业用途,若有侵权请联系删除(272966172@qq.com)。

瀑布流列表html代码

<ul id="container" class="tiles-wrap animated">
    <li><img src="img/image_1.jpg" width="200" height="283"><p>1</p></li>
    <li><img src="img/image_2.jpg" width="200" height="283"><p>1</p></li>
</ul>

演示一:默认

var wookmark = new Wookmark('#container', {
    // Prepare layout options.
    autoResize: true, // This will auto-update the layout when the browser window is resized.
    container: $('#main'), // Optional, used for some extra CSS styling
    offset: 5, // Optional, the distance between grid items
    outerOffset: 10, // Optional, the distance to the containers border
    itemWidth: 210 // Optional, the width of a grid item
});

演示二:无限加载

function onScroll() {
    // Check if we're within 100 pixels of the bottom edge of the broser window.
    var winHeight = window.innerHeight ? window.innerHeight : $window.height(), // iphone fix
            closeToBottom = ($window.scrollTop() + winHeight > $document.height() - 100);

    if (closeToBottom) {
        // Get the first then items from the grid, clone them, and add them to the bottom of the grid
        var $items = $('li', $container),
                $firstTen = $items.slice(0, 10).clone().css('opacity', 0);
        $container.append($firstTen);

        wookmark.initItems();
        wookmark.layout(true, function() {
            // Fade in items after layout
            setTimeout(function() {
                $firstTen.css('opacity', 1);
            }, 300);
        });
    }
}
$window.bind('scroll.wookmark', onScroll);

演示二:过滤功能

function onClickFilter(e) {
    var $item = $(e.currentTarget),
            activeFilters = [],
            filterType = $item.data('filter');

    if (filterType === 'all') {
        $filters.removeClass('active');
    } else {
        $item.toggleClass('active');

        // Collect active filter strings
        $filters.filter('.active').each(function() {
            activeFilters.push($(this).data('filter'));
        });
    }

    wookmark.filter(activeFilters, 'or');
}

// Capture filter click events.
$('#filters').on('click.wookmark-filter', 'li', onClickFilter);

声明:本资料由淘建站会员提供,如转载注明来源,资料来源淘建站免费素材库:https://www.taojz.cn/texiao/590.html
jQuery演示8种不同的瀑布流效果 希望对你有帮助,感谢您的支持!
  • jQuery瀑布流以动画animate加载图片

    jQuery瀑布流以动画animate加载图片

  • jQuery懒加载图片的瀑布流插件

    jQuery懒加载图片的瀑布流插件

  • jQuery Wookmark瀑布流插件

    jQuery Wookmark瀑布流插件

  • jQuery超酷响应式瀑布流效果

    jQuery超酷响应式瀑布流效果

  • jQuery插件masonry实现瀑布流布局

    jQuery插件masonry实现瀑布流布局

  • 瀑布流插件

    瀑布流插件

  • jquery wookmark 瀑布流

    jquery wookmark 瀑布流

  • html5手机页面响应式瀑布流图片布局

    html5手机页面响应式瀑布流图片布局

  • jQuery点击添加更多图片瀑布流代码

    jQuery点击添加更多图片瀑布流代码

  • 无限加载瀑布流

    无限加载瀑布流

  • 原创瀑布流布局原生js+jQuery

    原创瀑布流布局原生js+jQuery

  • 手机特效美丽的瀑布流

    手机特效美丽的瀑布流

  • 留言(0)
    头像
     阿里云限量代金券,戳我领取
    1 2