好用的JQ图片特效jquery-poptrox-popup-galleries
jQuery Poptrox – Popup galleries

Rate this (1 Vote)
jQuery Poptrox Adds popup galleries to jQuery. Heavily customizable, easy to use, and built to support images, YouTube videos, Vimeo videos, Soundcloud tracks, IFRAMEs, and AJAX content.
1. INCLUDE JS FILES
<script src= "jquery.poptrox.min.js" ></script> |
2. HTML
<div id= "gallery" > <a href= "path/to/image1.jpg" ><img src= "path/to/image1_thumbnail.jpg" /></a> <a href= "path/to/image2.jpg" ><img src= "path/to/image2_thumbnail.jpg" /></a> <a href= "path/to/image3.jpg" ><img src= "path/to/image3_thumbnail.jpg" /></a> <a href= "path/to/image4.jpg" ><img src= "path/to/image4_thumbnail.jpg" /></a> <a href= "path/to/image5.jpg" ><img src= "path/to/image5_thumbnail.jpg" /></a> <a href= "path/to/image6.jpg" ><img src= "path/to/image6_thumbnail.jpg" /></a> </div> |
3. JAVASCRIPT
var foo = $( '#gallery' ); foo.poptrox(); |
4. OPTIONS
poptrox() has numerous options one can use or override, if one were so inclined:
foo.poptrox({
preload: false, // If true, preload fullsize images in
// the background
baseZIndex: 1000, // Base Z-Index
fadeSpeed: 300, // Global fade speed
overlayColor: '#000000', // Overlay color
overlayOpacity: 0.6, // Overlay opacity
windowMargin: 50, // Window margin size (in pixels; only comes into
// play when an image is larger than the viewport)
windowHeightPad: 0, // Window height pad
selector: 'a', // Anchor tag selector
popupSpeed: 300, // Popup (resize) speed
popupWidth: 200, // Popup width
popupHeight: 100, // Popup height
popupIsFixed: false, // If true, popup won't resize to fit images
useBodyOverflow: true, // If true, the BODY tag is set to overflow: hidden
// when the popup is visible
usePopupEasyClose: true, // If true, popup can be closed by clicking on
// it anywhere
usePopupLoader: true, // If true, show the popup loader
usePopupCloser: true, // If true, show the popup closer button/link
usePopupCaption: false, // If true, show the popup image caption
usePopupNav: false, // If true, show (and use) popup navigation
usePopupDefaultStyling: true, // If true, default popup styling will be applied
// (background color, text color, etc)
popupBackgroundColor: '#FFFFFF', // (Default Style) Popup background color (when
// usePopupStyling = true)
popupTextColor: '#000000', // (Default Style) Popup text color (when
// usePopupStyling = true)
popupLoaderTextSize: '2em', // (Default Style) Popup loader text size
popupCloserBackgroundColor: '#000000', // (Default Style) Popup closer background color
// (when usePopupStyling = true)
popupCloserTextColor: '#FFFFFF', // (Default Style) Popup closer text color (when
// usePopupStyling = true)
popupCloserTextSize: '20px', // (Default Style) Popup closer text size
popupPadding: 10, // (Default Style) Popup padding (when
// usePopupStyling = true)
popupCaptionHeight: 60, // (Default Style) Popup height of caption area
popupCaptionTextSize: null, // (Default Style) Popup caption text size
popupBlankCaptionText: '(untitled)', // Applied to images that don't have captions
// (when captions are enabled)
popupCloserText: '×', // Popup closer text
popupLoaderText: '••', // Popup loader text
popupClass: 'poptrox-popup',// Popup class
popupSelector: null, // (Advanced) Popup selector (use this if you
// want to replace the built-in popup)
popupLoaderSelector: '.loader', // (Advanced) Popup Loader selector
popupCloserSelector: '.closer', // (Advanced) Popup Closer selector
popupCaptionSelector: '.caption', // (Advanced) Popup Caption selector
popupNavPreviousSelector: '.nav-previous',// (Advanced) Popup Nav Previous selector
popupNavNextSelector: '.nav-next', // (Advanced) Popup Nav Next selector
onPopupClose: null, // Called when popup closes
onPopupOpen: null // Called when popup opens
});
5. SUPPORTED TYPES
In addition to images, popups can also show other stuff (like YouTube videos). To do this, point your thumbnail’s anchor to the appropriate URL (see below for specifics) and give it a data-poptrox attribute like so:
<a href="http://untitled.tld/path/to/whatever" data-poptrox="type,(width)x(height)"><img src="path/to/thumbnail.jpg" /></a>
The data-poptrox attribute breaks down like this:
- type: The type (eg. youtube)
- (width)x(height): An optional width and height for the popup (eg. 800×400)
YouTube Videos
- Link format: http://youtu.be/xxxxxxxxxxx (found via the “Share” link)
- Type: youtube
- Example:
<a href="http://youtu.be/loGm3vT8EAQ" data-poptrox="youtube,800x480"><img src="path/to/thumbnail.jpg" /></a>
Vimeo Videos
- Link format: http://vimeo.com/xxxxxxxx (found via the “Share” button under “Embed”)
- Type: vimeo
- Example:
<a href="http://vimeo.com/22439234" data-poptrox="vimeo,800x480"><img src="path/to/thumbnail.jpg" /></a>
Soundcloud Tracks
- Link format: https://api.soundcloud.com/tracks/xxxxxxxx (found via the “Share” button under “Widget Code” or “WordPress Code”)
- Type: soundcloud
- Example:
<a href="https://api.soundcloud.com/tracks/93549370" data-poptrox="soundcloud"><img src="path/to/thumbnail.jpg" /></a>
IFRAMEs
- Link format: Anything.
- Type: iframe
- Example:
<a href="path/to/whatever.html" data-poptrox="iframe,600x400"><img src="path/to/thumbnail.jpg" /></a>
AJAX Content
- Link format: Anything (as long as it’s on the same domain)
- Type: ajax
- Example:
<a href="path/to/whatever.html" data-poptrox="ajax,600x400"><img src="path/to/thumbnail.jpg" /></a>
Ignore
This “special” (unspecial?) type just tells Poptrox to treat whatever’s in href as if it were a normal link.
- Link format: Anything.
- Type: ignore
- Example:
<a href="http://n33.co" data-poptrox="ignore"><img src="path/to/thumbnail.jpg" /></a>
好用的JQ图片特效jquery-poptrox-popup-galleries的更多相关文章
- Web 开发最有用的50款 jQuery 插件集锦——《图片特效篇》
<Web 开发最有用的50款 jQuery 插件集锦>系列文章向大家分享最具创新的50款 jQuery 插件,这些插件分成以下类别:网页布局插件,导航插件,表格插件,滑块和转盘插件,图表插 ...
- 20+功能强大的jQuery/CSS3图片特效插件
以下是分享的20几个不错的图片特效插件,基于jQuery和CSS3. 1.jQuery图片下滑切换播放效果 这是一款基于jQuery的焦点图插件,这款焦点图的特点是有向下滑动的动画效果,滑到底部时,有 ...
- 15个web前端的美轮美奂的 jQuery 图片特效
jQuery是一个非常优秀的 JavaScript 框架,使用简单灵活,同时还有许多成熟的插件可供选择.其中,jQuery 最令人印象深刻的应用之一就是对图片的处理,它可以让帮助你在你的项目中加入各种 ...
- 手风琴图片和钢琴导航栏JQ滑动特效
手风琴JQ滑动特效 1.效果预览: 2.相关代码: <!DOCTYPE html> <html lang="en"> <head> <me ...
- 8个超级震憾的Jquery图片特效欣赏,考验你的浏览器!
这次主要是来分享几个个人觉得十分震憾的图片特效,有jQuery的,有CSS3的,有很萌的乌鸦动画,也有简单朴实的图片播放动画,当然有些你可能已经看到过了,不过也没关系,你能路过就算是对我的支持了. j ...
- Lazy Load, 延迟加载图片的 jQuery 插件 - NeoEase
body { font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI ...
- JQ滚动特效
<!DOCTYPE html> <html lang="zh"> <head> <meta charset="UTF-8&quo ...
- 分享10款效果惊艳的HTML5图片特效
在HTML5的世界里,图片特效都十分绚丽,我们在网站上也分享过很多不错的HTML5图片特效,现在我们精选10款效果惊艳的HTML5图片特效分享给大家. 1.HTML5 3D正方体旋转动画 很酷的3D特 ...
- 分享10款效果惊艳的HTML5图片特效【转】
先插入一条广告,博主新开了一家淘宝店,经营自己纯手工做的发饰,新店开业,只为信誉!需要的亲们可以光顾一下!谢谢大家的支持!店名: 小鱼尼莫手工饰品店经营: 发饰.头花.发夹.耳环等(手工制作)网店: ...
随机推荐
- Evaluate Reverse Polish Notation——LeetCode
Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, -, ...
- margin:-75px的理解及妙用——纯CSS制作水平/垂直都居中短边为50px/长边为150px的红色十字架
有这么一个题目: 使用重构的方式制作出一个如下图的水平.垂直都居中短边为50px,长边为150px的红色十字架. 要求只使用2个div完成 答案: <!DOCTYPE html PUBLIC & ...
- Sentry Server 日志记录分析服务
原文地址:http://blog.shanbay.com/archives/998 或许你不太会喜欢异常,特别是那些发生后继而沉默在应用日志里那些,你不知道从何开始,因为它们看起来并非那么平易近人,但 ...
- 编写Lex和Yacc
大学课程设计中,有一次是编写Lex(词法分析器的生成器)和Yacc(语法分析器的生成器),编写这类工具软件不是一件容易的事情.这篇文章记录了当时编程时候的主要思想,主要还是编译原理的思想. 准备 Le ...
- 嵌套fragment时必须要重写 onDetach()
/** * 嵌套fragment时必须要重写 onDetach()如下 */ @Override public void onDetach() { super.onDetach(); ...
- 356. Line Reflection
首先找到X方向的中点,如果中点是一个点,那么分别从这个点开始往左右找就行:如果是一个区间,比如1 2之间,那么首先总点数得是偶数,然后以1和2往左右两边找就行.. 找的时候,有3种情况: 同时没找到, ...
- vue.js学习笔记(一):什么是mvvm框架,vue.js的核心思想
一:MVVM框架 MVVM框架的应用场景: 1.针对具有复杂交互逻辑的前端应用 2.提供基础的架构抽象 3.提供ajax数据持久化,保证前端用户体验 二:vue.js的核心思想 (一):数据驱动 ( ...
- 点击Enter键,文本框焦点改变 分类: WinForm 2014-04-15 10:30 223人阅读 评论(0) 收藏
一个例子: 一个简单的 登陆界面,有用户名.密码文本框.登陆按钮. 想要实现的效果是,用户输入用户名之后,点击Enter键进入到下一个文本框,同理,输入完密码之后,登陆按钮获得焦点,再次点击Ente ...
- HDU4530:小Q系列故事——大笨钟
Problem Description 饱尝情感苦恼的小Q本打算隐居一段时间,但仅仅在3月25号一天没有出现,就有很多朋友想念他,所以,他今天决定再出来一次,正式和大家做个告别. 小Q近来睡眠情况很差 ...
- css中var函数
引言: 在学习elementui的时候看到一个var.css, 其中写的全部都是以--开头的属性,上google查询不是css3新增的属性,于是决定一探究竟 :root { /* Transition ...