Releases: noelboss/featherlight
Releases · noelboss/featherlight
1.0.1
Features
- New option filter to attach lazily like
$(sel).on('click', filter, ...)
. Attaching is done for the whole set, not on each individual element. Attributes of the whole set and the filtered
element are combined. - New option otherClose to support extra closing buttons.
- New option root to support appending featherlight elsewhere than on the body.
- New content filter 'text' for plain text messages.
- New callback
onKeyDown
,beforeContent
,afterContent
- Gallery can display mixed content, not just images.
- Gallery defaults are accessible with
$.featherlightGallery.defaults
- Callbacks like
afterOpen
can be set usingdata-featherlight-after-open
- Gallery inherits Featherlight's prototype and class methods.
- Gallery can be called entirely from javascript.
- Gallery can be navigated using left and right arrow keys.
- Gallery uses its
autoBind
setting to automatically bind galleries. Its recommended to use it with thefilter
setting.
Breaking changes
$.featherlight
now always trigger a new lightbox. Use$.fn.featherlight
for attaching events to elements.- The order of the arguments of
$.fn.featherlight
has been reversed, for consistency and ease of use, but remain optional. - The configuration options
open
andclose
have been removed. - The configuration options
autostart
,context
andselector
have been merged to the global$.featherlight.autoBind
. It's also lazily attached, so items added via ajax, for example, will be automatically attached too. - The
$elm
attribute has been removed. - The
config
attribute has been removed and merged with thethis
object. - The
methods
global attribute has been removed. Methods have changed quite a bit. Access the prototype instead if needed. - Content returned from filters isn't cloned anymore.
- Gallery configuration has changed and is no longer nested under
gallery
.
Maintenance & Fixes
- Small bugs fixed
- Content filter 'jquery' now clones content and bound handlers.
0.4.1
0.4.0
Features
- New option
closeOnClick
to support closing by clicking anywhere - Any element inside the lightbox with the class
featherlight-close
will now trigger the closing event - Support for nested lightboxes
- Gallery uses swipes on touch devices (if a supported library present)
- Gallery support and uses events to navigate through the images
- New functions:
$.featherlight.close()
andcurrent()
- All configuration options have their equivalent html attribute.
- Improved and extensible content filters.
Breaking changes
closeOnBg
no longer supported, usecloseOnClick
- Gallery: class
.featherlight-prev
renamed to.featherlight-previous
The following changes could require changes to your custom CSS:
- Improves the way tall images are handled using a bottom border to maintain space (cut of instead of shrunken unproportionally)
- Improves the way the with of the lightbox is handled
- Changed paddings from % to pixels
- Added closing icon class to
featherlight-close-icon
Maintenance & Fixes
- Improvements for mobile devices
- Many small bugs fixed
- Tests added
$.fn.featherlight
is now chainable