slide切换:回调函数-进度条切换效果

$("#slideCallback").slide({ effect: "fade", trigger: "click", auto: true, keepTags: true }, function(cur, old){

    //获取操作对象
    var delay = 500,
        cfg = this.cfg,
        $tags = this.tags,
        $oldTag = $tags.eq(old),
        $curTag = $tags.eq(cur),
        $timerline = $curTag.find(".timerline");

    //让上一个进度条停止操作并隐藏
    clearTimeout($oldTag.find(".timerline").stop().hide().end().data("timerID"));

    //当前项的进度条延时运动
    $curTag.data("timerID", setTimeout(function(){
        $timerline.width(0).show().stop().animate({ width: $timerline.parent().width() }, cfg.interval - delay); // 切换间隔 - 延时
    }, cfg.duration + delay)); // 动画时间 + 延时
});