Example 4 - An Advanced Example

This example is very common with featured content. Each slide has a background image set with CSS. The text within the slides is only displayed for the open slide. In snippet below, the slideClass is set to frame. This setting will add a class of frame to each of the list-items. It will also add a class of frame-open for the open slide, frame-closed for the closed slides, and frame-previous for the slide that was previously open.

By default zAccordion will not add classes to the content. However, the option to add classes exists to make styling easy.

$(document).ready(function() {
	$("#example4 ul").zAccordion({
		slideWidth: 800,
		width: 1000,
		height: 353,
		timeout: 2000,
        auto: false,
		slideClass: "frame"
	});
});