举例说明如何改变切换效果; 效果: | Toggle slideshow
可自定义文字样式 如图2 也可去除文字(title longdesc 属性值赋空) 图1
$('img.image1').data('ad-desc', 'Whoa! This description is set through elm.data("ad-desc") instead of using the longdesc attribute.
And it contains How To Meet Ladies... What? That aint what HTML stands for? Man...');
$(function() {
var galleries = $('.ad-gallery').adGallery({
loader_image: './images/loader.gif', //loading图片地址
start_at_index: 0, //默认选中图片,0开始
thumb_opacity: 0.7, //小图模糊滤镜效果
animate_first_image: false, //第一张图片是否效果加载
animation_speed: 400, //动画切换时间
width: false, //宽定义
height: false, //高定义
display_next_and_prev: true,//显示上下页(大图)
display_back_and_forward: true,//显示上下页(小图)
scroll_jump: 0, // If 0, it jumps the width of the container
animated_scroll: true, //是否连续播放/滚动
slideshow: {
enable: true, //是否显示播放/暂停
autostart: false, //是否载入即播放
speed: 5000, //播放时间间隔
start_label: 'Start',//播放文字
stop_label: 'Stop', //暂停文字
stop_on_scroll: true,
countdown_prefix: '(',
countdown_sufix: ')'
},
effect: 'slide-hori', // 切换效果 'slide-vert', 'fade', or 'resize', 'none', false
enable_keyboard_move: false,
cycle: true,
callbacks: {
init: false,
afterImageVisible: false,
beforeImageVisible: false,
slideShowStart: false,
slideShowStop: false
}
});
$('#switch-effect').change(
function() {
galleries[0].settings.effect = $(this).val();
return false;
}
);
$('#toggle-slideshow').click(
function() {
galleries[0].toggleSlideshow();
return false;
}
);
});