Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ivoilic/tile-swapper

A simple tile swapping jQuery plugin.
https://github.com/ivoilic/tile-swapper

Last synced: 9 days ago
JSON representation

A simple tile swapping jQuery plugin.

Awesome Lists containing this project

README

        

Tile-Swapper.js Icon photo thumbnail.png

Tile Swapper

Copyright 2014 - Ivo Ilic

Free for non-commercial use as long as this credit remains intact

Depends:
~jquery.js

How to use:

1. Create div elements with the "tile-swap" class (The div must have a position value of "relative","fixed","absolute" and must have a width and height in px)

2. Give the div the "data-tile-width" attribute with the width of tile you want in px

3. Give the div the "data-tile-height" attribute with the height of tile you want in px

4. For automatic tile swapping give the div the "data-tile-speed" attribute with a time value in milliseconds

5. Inside of the div create any number of img elements to be used (For manual tile swapping the images will cycle in the order in which they appear within the div)

6. Make sure to provide a width and height attribute for each img element