Giter Club home page Giter Club logo

photobox's Introduction

Photobox v2.0.7

Welcome to Photobox, a lightweigth image displaying jQuery module. Demo


Documentation

Using Photobox is really easy!

1 - Install with Bower:

bower install photobox-js

2 - Add these lines at the right place in your document:

  • In the header:
<link rel="stylesheet" href="bower_components/photobox-js/dist/css/photobox.min.css">
  • In the body:
<img src="path/to/your/image" rel="photobox" title="anything you want">

and/or

<a href="path/to/your/image" rel="photobox" title="anything you want">

You can create albums by adding data-pb-album attribute to the element (data-pb-album="myAlbum")

  • At the end of the body:
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/photobox-js/dist/js/photobox.min.js">

/* Initialize Photobox */
<script>
	Photobox.init();
</script>

Add the attribute data-pb-album="Your album name" to group images.

You can pass options like this:

<script>
	Photobox.init({
		opacity: "0.8",
		duration: "500"
	});
</script>
Option Type Default Description
duration millisecond 500 Opening animation duration
opacity float 0.7 Opacity of the background (Between 0 and 1)
player boolean false Activate the player
interval millisecond 500 Duration between frames (For player)
wrapAround boolean false After the last image of an album you will go back to the first image

Tip: Don't forget to import jQuery before Photobox.

photobox's People

Contributors

greg-klein avatar

Stargazers

Fuxian Ding avatar

Watchers

James Cloos avatar  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.