GithubHelp home page GithubHelp logo

song-yuan / zoomwall.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericleong/zoomwall.js

0.0 2.0 0.0 3.96 MB

A content-focused photo gallery using a horizontal masonry layout that scales up in lightbox mode.

Home Page: http://ericleong.github.io/zoomwall.js

License: MIT License

CSS 14.60% JavaScript 85.40%

zoomwall.js's Introduction

zoomwall.js

zoomwall.js is a content-focused photo gallery using a horizontal masonry layout that scales up in lightbox mode.

Visit ericleong.github.io/zoomwall.js for a demo.

install

For those using bower

$ bower install zoomwall

usage

First, add a reference to zoomwall.js and zoomwall.css in your HTML file, like this:

<link rel="stylesheet" type="text/css" href="zoomwall.css" />
<script type="text/javascript" src="zoomwall.js"></script>

Then add the zoomwall class and run zoomwall.create() on the element that contains your images, after they have loaded.

For example, if this is the element that contains your images:

<div id="gallery" class="zoomwall">
	<img src="./images/01.jpg" data-highres="./images/01_1280.jpg" />
	<img src="./images/02.jpg" data-highres="./images/02_1280.jpg" />
	<img src="./images/03.jpg" data-highres="./images/03_1280.jpg" />
</div>

add this code in a <script> tag:

window.onload = function() {
	zoomwall.create(document.getElementById('gallery'));
};

Enable support for paging through photos by setting the second argument to true, like this: zoomwall.create(<element>, true).

Include high resolution photos using the data-highres attribute of your <img> tags.

zoomwall.js's People

Contributors

ericleong avatar wayou avatar

Watchers

James Cloos avatar yuan avatar

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.