A customizable lightbox plugin for jQuery. See the project page for documentation and a demonstration, and the FAQ for solutions and examples to common issues. Released under the MIT license.
Changelog:
Version 1.6.4 - 2016/05/10
Fixed bug where using the inline property would duplicate target elements, if the selector matched multiple elements.
Version 1.6.3 - 2015/07/27
Fixed regression that caused error in IE8 when the calculated initial size was negative. Fixes #741
Version 1.6.2 - 2015/07/13
Fixed iframe attribute name (allowFullScreen to allowFullscreen). Fixes #737
Version 1.6.1 - 2015/05/14
Replaced the inline onclick handler for cboxPhoto with a namespaced event for easier unbinding. Fixes #719.
Version 1.6.0 - 2015/03/03
Added two new properties that expose how <img> and <iframe> elements are created, to give users direct control over those elements. Fixes #700.
Version 1.5.15 - 2015/02/25
Adding to NPM, merged white-space cleanup & new language file.
Version 1.5.14 - 2014/9/9
When opening, append Colorbox to the DOM if it was detached for whatever reason. Fixes #645.
Version 1.5.13 - 2014/8/4
Fixed regression introduced with v1.5.12 with legacy versions of jQuery (1.3x-1.6x). References #628.
Version 1.5.12 - 2014/7/31
Allowed setting the overlay opacity via CSS, by setting Colorbox's opacity property to false. References #628.
Version 1.5.11 - 2014/7/31
Fixed bug where setting opacity to 0 was ignored. Fixes #628.
Optimized the setup procedure to be more efficient.
Removed $.colorbox.init() as it will no longer be needed (will self-init when called).
Removed use of $.browser.
Version 1.3.18 - October 07 2011
Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and example 1's controls.png
Fixed a regression where Flash content displayed in Colorbox would be reloaded if the browser window was resized.
Added safety check to make sure that Colorbox's markup is only added to the DOM a single time, even if $.colorbox.init() is called multiple times. This will allow site owners to manually initialize Colorbox if they need it before the DOM has finished loading.
Updated the example index.html files to be HTML5 compliant.
Changed the slideshow behavior so that it immediately moves to the next slide when the slideshow is started.
Minor regex bugfix to allow automatic detection of image URLs that include fragments.
Added properties "top", "bottom", "left" and "right" to specify a position relative to the viewport, rather than using the default centering.
Added property "data" to specify GET or POST data when using Ajax. Colorbox's ajax functionality is handled by jQuery's .load() method, so the data property works the same way as it does with .load().
Added property "fixed" which can provide fixed positioning for Colorbox, rather than absolute positioning. This will allow Colorbox to remain in a fixed position within the visitors viewport, despite scrolling. IE6 support for this was not added, it will continue to use the default absolute positioning.
Fixed ClearType problem with IE7.
Minor fixes.
Version 1.3.16 - March 01 2011
Files Changed:jquery.colorbox.js/jquery.colorbox-min.js, colorbox.css (all) and example 4 background png files
Better IE related transparency workarounds. IE7 and up now uses the same background image sprite as other browsers.
Added error handling for broken image links. A message will be displayed telling the user that the image could not be loaded.
Added new property: 'fastIframe' and set it to true by default. Setting to fastIframe:false will delay the loading graphic removal and onComplete event until iframe has completely loaded.
Ability to redefine $.colorbox.close (or prev, or next) at any time.
请发表评论