Nivoo Slider

The Nivoo-Slider is an image gallery running on Mootools, it started as a port of the jQuery Plugin NivoSlider. It currently features 18 different transition effects.

Repository hosted on github

please report issues here

Download it here »

How to use

Just include NivooSider.js and the NivooSlider.css to your HTML:

#HTML
<script type="text/javascript" src="NivooSlider.js"></script>
<link  href="NivooSlider.css" rel="stylesheet" type="text/css" media="screen" />

And the gallery structure:

#HTML
<div id="Slider" class="nivoo-slider">
   <img src="images/image1.jpg" alt="" title="insert text to display a caption" />
   <a href="#hyperlink">
    <img src="images/iamge2.jpg" alt="" title="This image is linked to a great website" />
   </a>
   <img src="images/image3.jpg" alt="" />
</div>

And then initialize the slider using the domready event:

#JS
window.addEvent('domready',function(){

    // The simple way
   new NivooSlider($('Slider'));

    // The more advanced way
    new NivooSlider($('Slider'), {
        animSpeed: 750,
       effect: 'sliceLeftRightDown',
       interval: 5000,
       orientation: 'horizontal',
       slices: 20
    }).addEvents({
       'onFinish': function(){
            // fired after each transition
        },
        'onStart': function(){
           // fired right before each transition
       }
    });
}

Documentation Class: NivooSlider

Syntax
#JS
var slider = new NivooSlider(element[, options]);

Arguments

  1. element - (mixed) An Element or the string id of an Element to apply the gallery to.
  2. Options - (object, optional) The Nivoo-Slider options object, described below:  
    • animSpeed - (number: defaults to 500) The time (duration) in ms of the transition
    • autoPlay - (bool: defaults to true) Start the transition automatically after initializing
    • cssClass - (string, defaults to nivooSlider) Name of the css class that is added after initializing the slider
    • directionNav -(bool: deafults to true) Shows controls to go back and forth
    • directionNavHide - (bool: defaults to false) Hides the navigation controls on mouseout, so they are only visible when the mouse cursor is over the slider element
    • directionNavWidth - (number,string: defaults to 20%) Width of the clickable area of the directional navigation. Can be a number for pixels or a string with a percentage of the full width.
    • effect - (string: defaults to sliceDown) Type of transition (see effects)
    • interval - (number: defaults to 3000) Interval in ms between the transitions, required for the autoPlay function
    • orientation - (string: defaults to vertical) Defines the direction of the transition, can be horizontal or vertical
    • pauseOnHover - (bool: defaults to true) Clears the interval on mouseover
    • slices - (number: defaults to 15) Number of the slices used for the transition

Events

  • start - (function) Is fired right before each transition
  • finish - (function) Is fired right after each transition

Effects

both 
  • fade
  • fold
  • random 
horizontal
  • sliceLeftDown
  • sliceLeftUp
  • sliceLeftRightDown
  • sliceLeftRightUp
  • sliceRightDown
  • sliceRightUp
  • wipeDown
  • wipeUp
vertical
  • sliceDownLeft
  • sliceDownRight
  • sliceUpDownLeft
  • sliceUpDownRight
  • sliceUpLeft
  • sliceUpRight
  • wipeLeft
  • wipeRight

Coming Features

preloading images, navigation

License

MIT-style license.

Post your comment

Comments

  • @Johannes Great! Thank you for this :)

    Posted by Thomas, 04/07/2012 10:27pm (11 months ago)

  • Fixed it! The arrows should be shown when the nivoo-slider element is hovered.

    Also using css3 transitions for the fading, instead of an js animation, animating the slices is enough already.

    Posted by Johannes, 04/07/2012 7:01pm (11 months ago)

  • @Thomas Thank you for pointing out this issue. I will fix this within this week.

    Posted by Johannes, 04/07/2012 11:13am (11 months ago)

  • Thanks for this great tool.


    With directionNavPosition: 'outside' and directionNavHide: 1, the direction nav only show when you hover the image.
    When trying to move on the direction nav, they disapear because the mouse isn't on the image anymore.

    Is it possible to show the direction nav when hovering the hidden direction nav?

    Posted by Thomas, 03/07/2012 10:06pm (11 months ago)

  • @Kelsey the image caption is pulled from the tite or longdesc of the image. But you could do the trick with a few lines of Javascript and inject content into the caption with the onFinish it's fired after the animation.

    Posted by Johannes, 04/06/2012 8:51pm (12 months ago)

  • Is there a way to incorporate HTML elements?

    I'm using this on a Joomla site, getting it to auto-populate from featured articles, but I'd like a bit of control over the text that gets displayed - separate titles, the first 20 words of the intro text, read more button, that sort of thing.

    Mootools is in the core of Joomla, so I'd definitely rather keep using this than add in jquery!

    Posted by Kelsey, 29/05/2012 2:25am (12 months ago)

  • @cyberjuls I just implemented this option, you can use disc (default), decimal (ascending numbers) or any string you like. Will commit the changes in a minute.

    Posted by Johannes, 01/03/2012 8:30pm (1 year ago)

  • do you plan to implement this soon?
    controlNavItem: 'decimal|disc|square|html-entity',

    I would love the decimal one

    Posted by cyberjuls, 01/03/2012 5:01pm (1 year ago)

  • Nice plugin this is a must.
    Check contao if you can make it a module this one will be a killer one ;).

    Posted by cyberjuls, 16/12/2011 12:53pm (1 year ago)

  • mmm nicy!!! Just integrated it to a contao based website. Work like a charm it reads my "catalog reader" images so nicely. really need that nav stuff at the bottom and please if you could just integrate numbers would be cool. You should really go for a contao plugin

    Posted by cyberjuls, 13/12/2011 1:50am (1 year ago)

1 2 3 next »

RSS feed for comments on this page | RSS feed for all comments