
Version 1.4 of Flux Slider is now available for download from GitHub. There has been a lot of additions in the latest version, read on for all the details.
View Transition Gallery | Download @ GitHub
Whats new in v1.4?
Three new transitions
Brand new in v1.4 are 3 new transitions to pick from, these include:
- Swipe, which produces blends between two images (requires a browser that supports CSS Masks).
- Dissolve, which is a simple opacity fade and ironically the most requested new transition.
- Blocks2, this is a variable on the original Blocks transition but transitions from top-left to bottom-right rather than in a random pattern.
Be sure to try them out in the online Transition Gallery.
Images can be associated with a link
If an image is wrapped in a link, the image when presented by Flux is now clickable. For example:
<div id="slider">
<img src="img/avatar.jpg" alt="" />
<img src="img/ironman.jpg" alt="" title="Ironman Screenshot" />
<a href="anotherpage.html"><img src="img/imagewithlink.jpg" alt="" /></a>
<img src="img/tron.jpg" alt="" />
</div>
Gracefully degrades in unsupported browsers
Flux no longer falls over with browsers that don’t support CSS transitions. By default images will just instantly switch but its possible to add you own custom fallback code, I’ll write a blog post on this in the coming weeks.
Full Changelog
- Added support for
imgtags nested insidea. These images inherit the link from their parent and are clickable. - Flux will now run when jQuery is in compatibility mode.
- Added basic inbuilt next/prev buttons. Pass in
controls: trueto the constructor. - Flux no longer silently fails on unsupported browsers, it builds the slider but just switches from one image to the other.
- Refactored setup code so that it works on IE.
- Added a lock to ensure that the
finish()function offlux.transitiononly ever fires once per transition. - Added support for
swipeLeft&swipeRightwhen used with Zepto.js. - Forced hardware acceleration on the
slidetransition so that it works better on iOS. - The
next()&prev()functions now pass on theleft/rightparam for supported transitions. - Created an abstract transition called
transition_gridwhich can be extended to produce grid based transitions. - Refactored the following transitions to use
transition_grid:bars,bars3d,blinds,blinds3d,blocks,tiles3d,zip. This reduces the size required to define each transition and ensures row/column rendering is done with the same code. - Added
supportsCSSPropertyfunction to perform feature checking on the browser. - Each transition can now check for browser compatibility at load time using
compatibilityCheck. - Added the
swipe,dissolveandblocks2transitions. - Added support for captions. Caption text is read from the
titleattribute of theimgelements. Captions need to be enabled by passingcaptions: trueinto the constructor. - Ensured that images still switch if no valid transitions are available.
- Autoplay now uses
setTimeoutrather thansetIntervalso that the delay between transitions is started only when a transition has completed. This prevents the case where a transition might take longer to execute than the provided delay time.
