jQuery Dichotomy Gallery Plugin
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
demo.html
dichotomy.css
dichotomy.jquery.json
jquery.dichotomy.js

README.md

jQuery Dichotomy Plugin

Demo

Try

Usage

You can use Dichotomy plugins through JavaScript or the markup API.

JavaScript usage:

$('.dichotomy').dichotomy()

Data-API usage:

<div class="dichotomy" data-level="0"></div>

Images must place in next div if don't pass in options.

<div class="dichotomy-images">
 <img src="2.jpg">
</div>

Options

Options can be passed via data attributes or JavaScript. For data attributes, append the option name to data-, as in data-animate="slideUp".

<tr>
    <td>animate</td>
    <td>string</td>
    <td>'fade'</td>
    <td>Type of animation: fadeIn-fadeOut, slideUp-slideDown ('slideUp') or from right to left ('slideSide')</td>
</tr>

<tr>
    <td>images</td>
    <td>array</td>
    <td>-</td>
    <td>Array of string path to background-image if image don't pass via markup</td>
</tr>
name type default description
direction string 'clockwise' Direction dividing block: clockwise or counterclockwise ('counter')
duration number 400 Duration animation. Time in ms. You can use jquery option 'slow' and 'fast'

Methods

####.dichotomy(options)

Initializes the galery with an optional options object.

$('.dichotomy').dichotomy({
    animate:'slideSide'
    });

####.dichotomy('divide')

Show next image

####.dichotomy('unite') Remove last image

Events

Dichotomy plugin have two ewents for hooking into functionality.

event description
divide This event fires when next image is shown.
unite This event fires when last image is removed.

jQuery Compatibility

Tested with jQuery 1.8.3 and next browser on Windows

  • IE 7/8/9
  • Chrome 24.0
  • Opera 12.14
  • Safari 5.1.7
  • Firefox 10.0.1

Please tell about find bug with other browser or platform.

License

Plugin licensed under the MIT license