Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zoomwall.js

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zoomwall.js

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

  • 1.1.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
307
increased by4.78%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Node.js CI Node.js Package

install

For those using npm

$ npm install zoomwall.js

usage

html

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>

Add the zoomwall class to the container element. Include high resolution photos using the data-highres attribute of each <img> tag.

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

javascript

Run zoomwall.create() on the container element (#gallery in this example), after they have loaded.

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

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

If there are multiple galleries, call zoomwall.keys() after loading the last gallery.

zoomwall.create(document.getElementById('first-gallery'));
zoomwall.create(document.getElementById('second-gallery'));
zoomwall.keys();

Keywords

FAQs

Package last updated on 22 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc