Skip to content

1.0.1

Compare
Choose a tag to compare
@marcandre marcandre released this 24 Nov 12:51
· 207 commits to master since this release

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 using data-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 the filter 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 and close have been removed.
  • The configuration options autostart, context and selector 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 the this 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.