Git Product home page Git Product logo

glisse.js's Introduction

Glisse.js

Glisse.js is a simple, responsive and fully customizable jQuery photo viewer. You'll like the transitions between two photos entirely assumed by CSS3.

To see the plugin in action here is two examples with some lovely photos of my friend Pierre Nizet.

Feel free to fork the project on github or ping me on twitter for any comments.

Demonstrations

Features

  • Keyboard navigation
  • Fully CSS Customizable
  • Animated with CSS3 keyframes
  • 7 different transition effects
  • Scale to the viewport
  • iPad & iPhone ready (soon a fully Android support)

Warning

This plugin uses a lot of new CSS3 features like keyframes. It’s definitely not a good idea to uses it on a general public website for the time. But my goal -if the plugin has good returns- is to make a fully compliant plugin, using javascript animation on old browsers. So stay tuned.

Roadmap

  • Fallbacks for old browsers
  • Add a paging

Documentation

Basic Usage

Put this script just after jquery in your document

<script src="glisse.js"></script>

Then include the base stylesheet (Before you own stylesheets)

This stylesheet contains the base style for Glisse.js but there are not visual style included!!

<link rel="stylesheet" href="glisse.css" />

Add a "data-glisse-big" attribute to your image. This attribute corresponds to your full view picture.

<img class="pics" src="thumb.jpg" data-glisse-big="big.jpg"/>

If you want image shows/groups, simply add a "rel" attribute to your links

<img class="pics" src="thumb-1.jpg" data-glisse-big="big-1.jpg" rel="group1"/>
<img class="pics" src="thumb-2.jpg" data-glisse-big="big-2.jpg" rel="group1"/>
<img class="pics" src="thumb-3.jpg" data-glisse-big="big-3.jpg" rel="group1"/>

If you want show a title during the slideshow, simply use the "title" attribute

<img class="pics" src="thumb-1.jpg" data-glisse-big="big-1.jpg" rel="group1" title="my awesome picture"/>
<img class="pics" src="thumb-2.jpg" data-glisse-big="big-2.jpg" rel="group1" title="wooh, another picture"/>

After it, call the plugin.

<script>
    $(function () {
        $('.pics').glisse({
            changeSpeed: 550, 
            speed: 500,
            effect:'bounce'
        }); 
    });
</script>

Options

Valid options for glisse.js are:

  • changeSpeed - Transition duration betwwen 2 pictures (default 1000)
  • speed - Open/Close slideshow duration (default 300)
  • dataName - change the data attribute name for fulscreen pictures (default data-glisse-big)
  • effect - Effect (default bounce)
    • Valid effect values:
    • bounce
    • fadeBig
    • fade
    • roll
    • rotate
    • flipX
    • flipY

##Compatibility

  • Firefox 4+
  • Opera 11.6+
  • Chrome 14+
  • Safari 5+
  • iPhone/iPad iOS 4.3+
  • BlackBerry OS v6+

Works but without CSS3 trantions:

  • Opera 10+
  • Firefox 3.6
  • IE8+

Credits

Licence

Licence Mit

glisse.js's People

Contributors

victa avatar

Stargazers

Menno Pietersen avatar

Watchers

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