Code Monkey home page Code Monkey logo

waterfall's Introduction

##Waterfall 是流体布局 jQuery 插件

  • 当前版本: 1.0.7
  • 更新时间: 2016.3.3

###安装方法

npm install jquery-waterfall --save

###使用方法

var $ = require('jquery');
var waterfall = require('jquery-waterfall');

$node.waterfall({/* 此处为设置选项, 可留空 */})

###设置选项

{
    selector:'.post-home',     //子元素class, 可留空
    columnCount:4,             // 列数,  纯数字, 可留空
    columnWidth:300,           // 列宽度, 纯数字, 可留空
    isResizable:false,         // 自适应浏览器宽度, 默认false
    end:function(){},          // 回调函数
}

waterfall's People

Contributors

imufeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

waterfall's Issues

1.0.6 和 1.0.7 各存在一个BUG

1.0.6 版本刷新时会出现所有图片不显示的情况,我看了一下,是因为图片宽度获取有问题
1.0.7 版本刚载入图片时会出现重叠的情况

1.0.7版本BUG

因为去除了Img onload事件,在图片未加载之前会出现item重叠的现象。

刷新载入图片会重叠

直接敲网址访问没问题,但是刷新访问就会出现第二行图片重叠到第一行。
测试机器:mac 10.9 chrome

会以第一张图片做为全局图片尺寸

问题:只要把第一个img的宽度和高度强制设置成固定值,后面所有的图片都会被强制设置成这个尺寸。

求解决:每一篇文章就是一个

,我想在第一个div里放一个幻灯片,图片尺寸是普通的2倍,现在的情况是如果我把这张幻灯的图片尺寸设置成原来的两倍,那么后面的所有文章图片会也按这个尺寸展示,所以能否处理下,让后面的图片按默认设置显示?

谢谢!

图片元素的高度不按比例缩小

$img.attr('src',isrc).css({ width:ix,
                        height:iy
                    });

我按例子写出来了
含有图片的元素宽度可以自适应
但是高度不按比例缩小
是否上面的height:的值应该为y

运行不正常

`<!doctype html>

<title>给某个独立元素加滚动条</title> <style> /* 开发调试专用 */ .HistoryContainer > div { min-height: 200px; height: 200px; }
    .HistoryContainerList, .HistoryContainer { }

    .HistoryContainerList { border: 1px solid; }

    .HistoryContainer {
        max-height: 472px;
        height: 472px;
        overflow-x: hidden;
    }

</style>
<script src="jquery-2.1.4.min.js"></script> <script src="jquery.waterfall.js"></script> <script type="text/javascript">
$(function() {

    for (var i = 0; i < 5; i++) {
        var str = "<div class='waterfall'>start" + i + "</div>";
        $("#HistoryContainer").append(str);
    }

    //给某个独立元素加滚动条
    var obj = $("#HistoryContainer").waterfall({
        columnCount:1,
        end: function() {
            console.log("run");
            FreshMessageHistory();
        }
    });

    function FreshMessageHistory() {
        for (var i = 0; i < 5; i++) {
            var str = "<div>" + i + "</div>";
            $("#HistoryContainer").append(str);
        }
    }
});
</script> `

完全不能用

不知道怎么使用

请问有没有DEMO啊,只有一个配置参考,连URL都没找到在哪里配置,访问相关网页又是404,有木有DEMO啊!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.