When comparing fancyBox 2 vs PhotoSwipe, the Slant community recommends PhotoSwipe for most people. In the question“What are the best browser image gallery libraries?” PhotoSwipe is ranked 2nd while fancyBox 2 is ranked 4th. The most important reason people chose PhotoSwipe is:
No jQuery, Zepto or anything else dependency.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Accepts multiple media types
Fancybox accepts many media types including:
- Ajax
- Iframe
- Inline HTML
- SWF
Pro Can be instantiated in multiple ways
You can create a new fancy box in many ways, making it flexible to how your site is built.
You can provide it with a jQuery object, a href and title object, a string, or an array of objects or strings.
Pro Responsive
Responsiveness helps it work well for small screens and phones.
However, the responsiveness is implemented using javascript resize events instead of being a CSS only solution.
Pro VanillaJS
No jQuery, Zepto or anything else dependency.
Pro Responsive
Pro Blazing fast and smooth animations
Pro Zombie browsers support
Supports IE8 and above.
Pro Seems lightweight
Cons
Con Has a jQuery dependency
Con Deprecated
fancyBox has a new version, and the version 2 is no longer supported.
Con You have to include the HTML template by yourself
The JavaScript does not generate any DOM elements to keep the bundle size low, so the task of creating the elements to put the gallery slides into is all yours.
Alternative Products
