Default options
$("#myBillboard")
.billboard({
ease: "easeInOutExpo", // animation ease of transitions
speed: 1000, // duration of transitions in milliseconds
duration: 5000, // time between slide changes
autoplay: true, // whether slideshow should play automatically
loop: true, // whether slideshow should loop (only applies if autoplay is true)
transition: "left", // "fade", "up", "down", "left", "right"
navType: "list", // "controls", "list", "both" or "none"
styleNav: true, // applies default styles to nav
includeFooter: true, // show/hide footer (contains caption and nav)
autosize: true, // attempts to detect slideshow size automatically
resize: false, // attempts to detect each slide's size automatically
stretch: true // stretch images to fill container
});
The markup
Sample billboards
$("#billboard1")
.billboard();
$("#billboard2")
.billboard({
transition: "right",
duration: 2000,
speed: 500,
navType: "controls",
autosize: false
});
$("#billboard3")
.billboard({
transition: "up",
navType: "none",
stretch: false
});
$("#billboard4")
.billboard({
ease: "easeInOutElastic",
speed: 2000,
transition: "down"
});
$("#billboard5")
.billboard({
transition: "fade",
includeFooter: false,
resize: true
});
$("#billboard6")
.billboard({
onSlideChange: slideChangeHandler
});
function slideChangeHandler( curSlide, prevSlide, reverse, args )
{
var slide = this.billboard().get(curSlide);
// do stuff
}
$("nav.goto a")
.click(function(e) {
e.preventDefault();
$("#billboard6")
.billboard()
.goto( $("nav.goto a").index(this) );
});