Have a look at the demos to get an idea of what can be done with the Nivo Slider or check out the showcase of sites using the Nivo Slider. If you want your site in the showcase, then let me know and I'll get it up.
To use the Nivo Slider you have to include jQuery, the Nivo Slider script and the Nivo Slider CSS on your page:
Next you need to add some HTML. This is ususally just a div with images. Note that only images or images wrapped in links are allowed in the slider div. Any other HTML will break the slider.
To add a caption to an image you simply need to add a title attribute to the image. To add an HTML Caption simply set the title attribute to the ID of a element that contains your caption (prefixed with a hash). Note that the HTML element that contains your caption must have the CSS class nivo-html-caption applied and must be outside of the slider div.
Linking of images is also supported as of v1.2:
Finally you need to hook up your script using the $(window).load() function:
The Nivo Slider has plenty of options to fiddle with. Below is an example of the code with all available options and their defaults:
The effect parameter can be any of the following:
sliceDown
sliceDownLeft
sliceUp
sliceUpLeft
sliceUpDown
sliceUpDownLeft
fold
fade
random
These rules are optional but are recommended to make the Nivo Slider look totally rad when you use it.
#slider {
position:relative;
//See the "style-pack" below for image
background:url(images/loading.gif) no-repeat 50% 50%;
}
#slider img {
position:absolute;
top:0px;
left:0px;
display:none;
}
Due to the fact you have to use the $(window).load() function there is a delay before the plugin apply's certain styles to the elements. You can help this by manually applying the above CSS styles to stop the images flashing on the page before the plugin loads.
To stop the slider looking a bit weird make sure all of your images are the same size.
To manually start and stop the slider you can use the following code:
$('#slider').data('nivo:vars').stop = true; //Stop the Slider
$('#slider').data('nivo:vars').stop = false; //Start the Slider