使用AD Gallery制作强大的相册画廊
来源:互联网 发布:sql中视图的作用 编辑:程序博客网 时间:2024/06/05 14:25
使用AD Gallery制作强大的相册画廊
分类: JS2013-10-29 11:35 89人阅读 评论(0) 收藏 举报
AD Gallery相册ad-galleryad-galleryAPI
AD Gallery是一个带缩略图导航浏览,可设置照片标题和备注说明信息的jQuery相册插件。该插件提供了许多可配置的参数和方法,具有很强的定制功能。
http://www.helloweba.com/view-blog-61.html
这个上面说的详细,就是插件常用参数一览表不够详细我所以我就只说明一下这个参数表吧
AD Gallery插件常用参数一览表
参数描述默认值loader_image加载时的照片loader.gifwidth照片的宽度,默认为false,为false时直接读取css的宽度falseheight照片的高度,默认为false,为false时直接读取css的高度falsethumb_opacity设置缩略图的透明值0.7start_at_index第一张展示的大照片0update_window_hash没用过,这是英文说明,不太懂Whether or not the url hash should be updated to the current imagetruedescription_wrapper可以设置一个DIV用来展示照片的标题和描述信息。如description_wrapper: $('#descriptions')$('#ad-image-description')animate_first_image是否让第一张图也是以动画显示出来falseanimation_speed切换图片时间400display_next_and_prev是否显示上一张下一张导航按钮truedisplay_back_and_forward是否显示缩略图导航按钮truescroll_jump如果为0,跳转容器宽度0slideshow用来设置开始和暂停功能enable: true,//是否启用开始和暂停功能
autostart: true,是否自动播放
speed: 5000,切换时间
start_label: 'Start',开始按钮显示的内容,可以为图片按钮
stop_label: 'Stop',停止按钮显示的内容,可以为图片按钮
stop_on_scroll: true, //当停止时是否滚动小图列表
countdown_prefix: '(',//倒记时左边
countdown_sufix: ')',//倒记时右边
onStart: function() {
// Do something wild when the slideshow starts
},
onStop: function() {
// Do something wild when the slideshow stops
} effect设置展示效果,'slide-hori', 'slide-vert', 'fade', 'resize', 'none''slide-hori'splitTitle窗口标题属性titleenable_keyboard_move是否使用键盘方向键切换导航truecycle是否循环显示照片,如果设置为false时,则到最后一张照片时就会停止切换true
callbacks
//初始化
init: function() {
// 加载全部图片
this.preloadAll();
// 加载回三个
this.preloadImage(0);
this.preloadImage(1);
this.preloadImage(2);
},
// 回调图片后的
afterImageVisible: function() {
// 加载下一张图
var context = this;
this.loading(true);
this.preloadImage(this.current_index + 1,
function() {
// This function gets executed after the image has been loaded
context.loading(false);
});
// 不同的动画效果
if(this.current_index % 2 == 0) {
this.settings.effect = 'slide-hori';
} else {
this.settings.effect = 'fade';
}
},
// 回调图片前的
beforeImageVisible: function(new_image, old_image) {
// Do something wild!
} hooks钩子
displayDescription: function(image) {
alert(image.title +" - "+ image.desc);
}
- var galleries = $('.ad-gallery').adGallery({
- loader_image: 'loader.gif',
- // Width of the image, set to false and it will
- // read the CSS width
- width: 600,
- // Height of the image, set to false and it
- // will read the CSS height
- height: 400,
- // Opacity that the thumbs fades to/from, (1 removes fade effect)
- // Note that this effect combined with other effects might be
- // resource intensive and make animations lag
- thumb_opacity: 0.7,
- // Which image should be displayed at first? 0 is the first image
- start_at_index: 0,
- // Whether or not the url hash should be updated to the current image
- update_window_hash: true,
- // Either false or a jQuery object, if you want the image descriptions
- // to be placed somewhere else than on top of the image
- description_wrapper: $('#descriptions'),
- // Should first image just be displayed, or animated in?
- animate_first_image: false,
- // Which ever effect is used to switch images, how long should it take?
- animation_speed: 400,
- // Can you navigate by clicking on the left/right on the image?
- display_next_and_prev: true,
- // Are you allowed to scroll the thumb list?
- display_back_and_forward: true,
- // If 0, it jumps the width of the container
- scroll_jump: 0,
- slideshow: {
- enable: true,
- autostart: true,
- speed: 5000,
- start_label: 'Start',
- stop_label: 'Stop',
- // Should the slideshow stop if the user scrolls the thumb list?
- stop_on_scroll: true,
- // Wrap around the countdown
- countdown_prefix: '(',
- countdown_sufix: ')',
- onStart: function() {
- // Do something wild when the slideshow starts
- },
- onStop: function() {
- // Do something wild when the slideshow stops
- }
- },
- // or 'slide-vert', 'resize', 'fade', 'none' or false
- effect: 'slide-hori',
- // Move to next/previous image with keyboard arrows?
- enable_keyboard_move: true,
- // If set to false, you can't go from the last image to the first, and vice versa
- cycle: true,
- // All hooks has the AdGallery objects as 'this' reference
- hooks: {
- // If you don't want AD Gallery to handle how the description
- // should be displayed, add your own hook. The passed image
- // image object contains all you need
- displayDescription: function(image) {
- alert(image.title +" - "+ image.desc);
- }
- },
- // All callbacks has the AdGallery objects as 'this' reference
- callbacks: {
- // Executes right after the internal init, can be used to choose which images
- // you want to preload
- init: function() {
- // preloadAll uses recursion to preload each image right after one another
- this.preloadAll();
- // Or, just preload the first three
- this.preloadImage(0);
- this.preloadImage(1);
- this.preloadImage(2);
- },
- // This gets fired right after the new_image is fully visible
- afterImageVisible: function() {
- // For example, preload the next image
- var context = this;
- this.loading(true);
- this.preloadImage(this.current_index + 1,
- function() {
- // This function gets executed after the image has been loaded
- context.loading(false);
- }
- );
- // Want slide effect for every other image?
- if(this.current_index % 2 == 0) {
- this.settings.effect = 'slide-hori';
- } else {
- this.settings.effect = 'fade';
- }
- },
- // This gets fired right before old_image is about to go away, and new_image
- // is about to come in
- beforeImageVisible: function(new_image, old_image) {
- // Do something wild!
- }
- }
- });
- // Set image description
- some_img.data('ad-desc', 'This is my description!');
- // Change effect on the fly
- galleries[0].settings.effect = 'fade';
原地址:http://adgallery.codeplex.com/documentation
0 0
- AD Gallery制作强大的相册画廊
- 使用AD Gallery制作强大的相册画廊
- 使用AD Gallery制作强大的相册画廊
- 使用AD Gallery制作强大的相册画廊
- 使用AD Gallery制作强大的相册画廊
- 画廊控件Gallery的使用
- android 画廊控件Gallery的使用
- 使用JQuery插件Pinto 和Lightbox 制作带网格布局的响应式(Responsible)画廊(gallery)
- jQuery AD Gallery相册插件
- jQuery AD Gallery相册插件
- RecycleView实现的Gallery画廊效果(图片制作成圆角)
- 【Android 开发】:UI控件之 Gallery 画廊控件的使用
- android中画廊视图Gallery和ImageSwitcher组件的使用
- Android开发学习之Gallery画廊的使用
- Visual Composer插件使用之画廊gallery的简码操作
- 画廊效果Gallery控件的使用(横向列表)
- Android中Gallery(画廊)的创建与使用
- Gallery画廊
- 吼吼吼
- Preparedstatement和statement 区别
- 互联网产品血拼,免费更是大势所趋?
- Spring MVC 中的基于注解的 Controller
- 【10.2移动新特性】揭秘ArcGIS 10.2移动产品的离线功能【上:桌面模式】
- 使用AD Gallery制作强大的相册画廊
- Hibernate,Ibatis,Jdbc 区别
- 指函数指针数组的使用
- Nova Scheduler 调度过程简述
- NYOJ 138 找球号(二)
- 利用curator实现的zookeeper分布式锁服务
- 解析xml文件的几种技术
- _Z5qFreePv mingwm10.dll,libgcc_s_dw2-1.dll 相关问题
- linphone sip 处理