=== WP jQuery Lightbox ===
Contributors: ulfben
Donate link: http://flattr.com/thing/367557/Support-my-WordPress-plugins
Tags: lightbox, jquery, nodal, image, display, ulfben
Requires at least: 3.9
Tested up to: 4.4
Stable tag: 1.4.8
License: GPLv2 or later
A drop-in replacement for Lightbox 2 and similar plugins, shedding the bulk of Prototype and Scriptaculous. Improved for mobile devices.
== Description ==
This plugin lets you keep [the awesome Lightbox 2](http://www.huddletogether.com/projects/lightbox2/)-functionality, but sheds the bulk of the Prototype Framework **and** Scriptaculous Effects Library.
Warren Krewenki [ported Lightbox to jQuery](http://warren.mesozen.com/jquery-lightbox/) and this plugin is mostly a wrapper to his work: providing localization support, an admin panel for configuration, (optional) auto-boxing of your image links and support for [WordPress galleries](http://codex.wordpress.org/Gallery_Shortcode), *including* [media library](http://codex.wordpress.org/Media_Library_SubPanel) titles and captions.
This version is also [adjusted for mobile devices](http://wordpress.org/extend/plugins/wp-jquery-lightbox/screenshots/);
* Swipe gestures for flicking between images on touch devices
* Improved scaling *maximizes* use of screen space
* Live adjustment to the browser window and orientation of your phone
See the plugin in action here: [http://game.hgo.se/blog/motion-capture/](http://game.hgo.se/blog/motion-capture/)
You can browse images with your keyboard: Arrows, P(revious)/N(ext) and X/C/ESC for close.
If you value [my plugins](http://profiles.wordpress.org/users/ulfben/), there's several ways you can help me out;
* Help me out by [Flattr-ing them](http://flattr.com/thing/367557/Support-my-WordPress-plugins)
* or [sign up to Microsoft OneDrive using my referral link](https://onedrive.live.com?invref=b1f728851abada15&invsrc=90) - we both get 0.5GB extra for free!
* or [sign up to RealPlayer Cloud using my referral link](https://cloud.real.com/r/UzKHSP) - we both get 1GB extra for free!
* get me anything from [my Amazon whislisth](http://www.amazon.com/gp/registry/wishlist/2QB6SQ5XX2U0N/105-3209188-5640446?reveal=unpurchased&filter=all&sort=priority&layout=standard&x=11&y=10) (used items are OK!)
Any help is greatly appreciated. Thanks!
*[//Ulf Benjaminsson](http://www.ulfben.com)*
= 1.4.8 (2015-12-31) =
* Fixed translations not being loaded properly
* Fixed support for WordPress 4.4
= 1.4.7 (2015-09-21) =
* Support for WordPress' new translation system.
* Updated translation for Portugese (Thanks: Pedro Mendonça)
* Added images and CSS for Portugese (Thanks: Pedro Mendonça)
= 1.4.6 (2015-03-20) =
* "Download link" now correctly open a download dialogue instead of displaying the file
* Title, caption and all control elements can now be turned on / off individually
* Added support for custom style sheets (just copy original to your theme's style folder, and hack away)
* Restructured the HTML slightly, making styling easier
* Added specific CSS selectors for all elements
* Fixed animation speed setting being ignored
* Dropped quirks support for Internet Explorer 8
* Removed help-text setting
= 1.4.5 (2013-06-09) =
* Fit to screen edge on low rez displays (<500px)
* Added global setting to hide title & caption
* Reduced the amount of code running for each image shown
* Updated German translation (thanks [Niko23](http://wordpress.org/support/topic/translation-of-client-side-text?replies=5#post-4230050))
* Fix: swipe direction
* Fix: slideshow now waits for images to display before starting timer.
* Fix: support for latest jQuery
* Fix: WordPress encoding wrong quote mark in captions, causing duplicate texts to display.
= 1.4.1 (2013-02-03) =
* Added swipe gestures on touch devices
* Added slideshow
* Added support for multiple sets in one post (use: [`group`](http://wordpress.org/extend/plugins/wp-jquery-lightbox/installation/) with the gallery-shortcode)
* Added support for arbitrary Download links via the [`data-download`-attribute](http://wordpress.org/extend/plugins/wp-jquery-lightbox/installation/)
* Added support to pick text from the image ALT-attribute (if title is not available)
* Added translations: Norwegian Bokmål (thanks [Ole Martin Kristiansen](http://hvorerole.com/)!)
* Fix regexp to deal with urls like www.gif.org. (Thanks Yannick Berker!)
* Fix changed common IDs to avoid collisions. (you'll have to update your CSS now!) (Hat tip; Pollmann Frederic)
* Fix better support of Infinite Scroll and similar
* Fix toggling visible state on unrelated object, embed and select nodes. [mwolfe02](http://wordpress.org/support/topic/lightbox-shows-hidden-selectembedobject-blocks?replies=1)
* Fix leaky CSS on admin page
[Older changelogs moved here.](http://wordpress.org/extend/plugins/wp-jquery-lightbox/changelog/)
== Installation ==
1. Upload the `wp-jquery-lightbox`-folder to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress
1. Check out the jQuery Lightbox-panel in your admin interface for usage details and configuration.
= How to Use: =
1. With [WordPress built-in gallery](http://codex.wordpress.org/Gallery_Shortcode): [`[gallery link="file"]`](http://codex.wordpress.org/Gallery_Shortcode)
1. All galleries in a post make a single slideshow. To create separate slideshows, use `group`:
`[gallery link="file" ids="1,2,3" group="mon"]`
`[gallery link="file" ids="4,5,6" group="tue"]`
1. You can manually add a `rel="lightbox"` attribute to any link:
`image #1`
Note the use of title-attribute to set a caption
1. To manually group sets of related images, follow step 3 but additionally include a group name in the `rel` attribute:
`image #1`
`image #2`
`image #3`
1. You can use the `data-download` attribute to set a custom download link:
` [...] `
1. To *disable* lightboxing of an image link, just set any other rel-attribute: `rel="nobox"`
1. Keyboard support: Arrows, P(revious)/N(ext) and X/C/ESC for close. Swipe left / right on touch devices.
1. [Infinite-Scroll](http://wordpress.org/extend/plugins/infinite-scroll/) and similar "endless pages"-plugins should call `doLightbox();` whenever it loads new content. Check your plugin for a setting
named "callbacks" - code that is called after each new page is loaded. Add this line;
`if(typeof doLightBox !== 'undefined' && typeof jQuery !== 'undefined'){
doLightBox();
}`
1. On the server side you can apply lightbox to any content by running `jqlb_apply_lightbox($your_html_content, "any ID");` It returns a string with all image links lightboxed, grouped by `"any id"`.
= Trouble shooting: =
If you have problems with WP jQuery Lightbox, please make sure you try these steps before asking for help. If you ask for help and I find any of these steps would fix the problem, I will just link you back here to do the work yourself.
1. Make sure your site is not throwing any javascript errors. Use [your browsers javascript console](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) to find out.
If you're running a custom theme:
1. Make sure you have [`wp_head();`](http://codex.wordpress.org/Function_Reference/wp_head) just before the closing `` tag of your theme, or you will break many plugins, which generally use this hook to reference JavaScript files.
1. For the same reason, always have `wp_footer();` just before the closing `