zAccordion — Another Advanced Example
A visitor requested an accordion with effects similar to the accordion on the BBC Food website. This can be created with later releases of zAccordion.
Implementation
$(document).ready(function() {
$("#slider").zAccordion({
width: 884,
speed: 600,
slideClass: "slider",
animationStart: function() {
$("#slider").find("li.slider-open div.slider-info").css("display", "none");
$("#slider").find("li.slider-previous div.slider-info").css("display", "none");
},
animationComplete: function() {
$("#slider").find("li.slider-open div.slider-info").fadeIn(600);
$("#slider").find("li.slider-previous div.slider-info").fadeIn(600);
},
slideWidth: 600,
height: 400
});
});
Similar to the Advanced Example, most of the CSS is used to style the tooltip, or info box.
#slider li {overflow:visible !important;}
#slider div.slider-bg {background:#000;top:300px;height:102px;width:600px;left:0;position:absolute;z-index:10;opacity:.5;}
#slider strong {margin-bottom:5px;text-shadow:none;color:#fff;}
#slider p {text-shadow:none;color:#fff;}
#slider .slider-closed div.slider-info {top:300px;height:72px;left:0;position:absolute;width:65px;z-index:15;padding:15px;}
#slider .slider-closed strong {font-size:18px;margin-bottom:5px;}
#slider .slider-closed p {display:none;font-size:11px;line-height:14px;text-shadow:none;color:#fff;margin:0 !important;}
#slider .slider-open div.slider-info {top:300px;height:72px;left:0;position:absolute;width:570px;z-index:15;padding:15px;}
#slider .slider-open strong {font-size:22px;color:#fff;}