0
높이를 자동으로 계산하도록 컨테이너를 얻으 려하고 다음 코드를 사용하지만 행운은 없습니다.jQuery 사이클을 사용하여 컨테이너의 자동 높이
컨테이너는
/* <![CDATA[ */
var jqu = jQuery.noConflict();
jqu(function() {
/* Cycle */
jqu('#featured-content').cycle({
slideExpr: '.featured-post',
fx: 'fade',
speed: 1000,
cleartypeNoBg: true,
pager: '#slide-thumbs',
containerResize: true,
slideResize: false,
width: '100%',
timeout: 5000,
prev: '#slider-prev',
next: '#slider-next',
pagerAnchorBuilder: function(idx, slide) {
// return selector string for existing anchor
return '#slide-thumbs li:eq(' + idx + ') a';
}
});
// call back function to animate the height of the container
function onAfter(curr, next, opts, fwd) {
var index = opts.currSlide;
$('#slider-prev')[index == 0 ? 'hide' : 'show']();
$('#slider-next')[index == opts.slideCount - 1 ? 'hide' : 'show']();
//get the height of the current slide
var $ht = $(this).height();
//animates the container's height to that of the current slide
$(this).parent().animate({ height: $ht });
}
});
/* ]]> */