📄 jqgalview.js
字号:
/**
* jQuery jqGalView Plugin
* Examples and documentation at: http://benjaminsterling.com/2007/08/24/jquery-jqgalview-photo-gallery/
* This is a port of http://www.flashimagegallery.com/pics/artwork/
*
* @author: Benjamin Sterling
* @version: 2.1
* @copyright (c) 2007 Benjamin Sterling, KenzoMedia
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* @requires jQuery v1.1.3.1 or later
* @optional jQuery Easing v1.1.1
* @optional jQuery jqModal v2007.08.17 +r11
*
*
* @name jqGalView
* @example $('ul').jqGalView();
*
* @Semantic requirements:
* The structure fairly simple and should be unobtrusive, you
* basically only need a parent container with a title
* attribute and a list of imgs
*
* <ul title="My Gallery" id="gallery">
* <li><img src="common/img/dsc_0003.thumbnail.JPG"/></li>
* <li><img src="common/img/dsc_0012.thumbnail.JPG"/></li>
* </ul>
*
* -: or :-
*
* <div title="My Gallery" id="gallery">
* <img src="common/img/dsc_0003.thumbnail.JPG"/>
* <img src="common/img/dsc_0012.thumbnail.JPG"/>
* </div>
*
* @param Integer getUrlBy
* By default, it is set to 0 (zero) and the plugin will
* get the url of the full size img from the images
* parent A tag, or you can set it to 1 will and provide
* the fullSizePath param with the path to the full size
* images. Finally, you can set it to 2 and provide text
* to prefix param and have that prefix removed from the
* src tag of the thumbnail to create the path to the
* full sized image
*
* @example $('#gallery').jqGalView({getUrlBy:1,fullSizePath:'fullPath/to/fullsize/folder'});
*
* @example $('#gallery').jqGalView({getUrlBy:2, prefix:'.tn'});
* ".tn" gets removed from the src attribute of your image
*
* @param String fullSizePath
* Set to null by default, but if you are going to set
* getUrlBy param to 1, you need to provide the full path
* to the full size image.
*
* @example $('#gallery').jqGalView({getUrlBy:1,fullSizePath:'fullPath/to/fullsize/folder'});
*
* @param String prefix
* Set to null by default, but if you are going to set
* getUrlBy param to 2, you need to provide text you
* want to remove from the src attribute of the thumbnail
* to get create the full size image name
*
* @example $('ul').jqGalView({getUrlBy:2, prefix:'.tn'});
* ".tn" gets removed from the src attribute of your image
*
* @param Integer items
* Set to 20 by default, and will set the plugin to show
* 20 thumbnails (or what ever number you want) at a time
*
* @example $('#gallery').jqGalView({items:50});
*
* @param String openTxt
* The text you want to have shown when you hover over a
* thumbnail
*
* @example $('#gallery').jqGalView({openTxt:"Open Me"});
*
* @param String backTxt
* The text that gets append to the full images title
* attribute to give a hint for the user to click to
* return to the thumbnails
*
* @example $('#gallery').jqGalView({backTxt:"Close Me"});
*
* @param String goFullSizeTxt
* The text that gets appended after the alt text when
* the full sized image is being view and will allow the
* user to view the resized full image in a new browser
* window or in the modal box
*
* @example $('#gallery').jqGalView({goFullSizeTxt:"See full sized unresized"});
*
* @param String tnease
* Set to null by default and will need the easing plugin
* if set otherwise and will add easing to the thumbnail
* scrolling
*
* @see http://gsgd.co.uk/sandbox/jquery.easing.php
*
* @example $('#gallery').jqGalView({tnease:"easein"});
*
* @param String title
* Set to null by default and will allow you to add a
* title to gallery if not already set in a title tag
* of the parent element of the thumbnail group
* eg. <ul title="this is title">
*
* @example $('#gallery').jqGalView({title:"This is a title for my gallery"});
*
* @param String headerElements
* By default, this param is set to
* <div class="gvHeader">%t</div> with the %t being
* required to append the title to the gallery. You will
* be able to passing any dom structure you need to
* achieve a specific design you are expecting for your
* gallery header.
*
* @example $('#gallery').jqGalView({headerElements:"<div class="gvHeader"><div class="left"></div><div class="middle">%t</div><div class="right"></div></div>"});
*
* @styleClasses
* gvHeader: Main header
* gvContainer: overall holder of thumbnails and gvHolder div, the
* gvLoader div and the gvImgContainer div
* gvHolder: contains the thumbnails divs
* gvItem: contains the thumbnail img, the gvLoaderMini div and the gvOpen div
* gvLoaderMini :empty but styled with a loader images as background image.
* gvOpen: contains the open text
* gvImgContainer: the full size image container and the gvDescText div
* gvDescText: contains the alt text for the image and the open full
* size text
* gvLoader: empty but styled with a loader images as background image.
* gvFooter: contains the pagination links
* gvLinks: contains the actual links
*
*
* changes:
* 09/26/2007
* Fixed: Changed this.altImg = $this.src.replace(item.opts.prefix,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -