v3.1.20
-
It is now possible to disable or customize open/close/transition animations
-
fancyBox is now multilingual, you can set language using
lang
option and add new language usingi18n
-
Changed default content type from "iframe" to "image" to avoid typical confusion
when using links likeimage.php?id=123
without specifying content type;
this means that you have to setdata-type="iframe"
for your iframe links; -
Simplified manual calling, it now works without using
opts
option (similarly to v2) for example:
$.fancybox.open({src: '<div><h1>Hello!</h1></div>', type: 'html', beforeShow: function(){ console.info('It works!'); }});
-
New option
protect
- disables right click for any content type, replaces "image.protect" option -
New option
mobile
- collection of options that will override current settings when mobile device is detected -
New option
idleTime
- customize or disable idle time -
Option
closeTpl
is now replaced bybtnTpl.smallBtn
-
Removed option
closeClickOutside
-
New options
clickContent
,clickSlide
,clickOutside
to handle click events (possible values: "close", "next", "nextOrClose", "toggleControls", "zoom", false or function) -
Unified module option naming; "thumbs", "fullScreen" and "slideShow" now have
autoStart
option
that replaces previously usedshowOnStart
/requestOnStart
options. -
Slideshow now uses Page Visibility API to pause slideshow when window is not active
-
Option
selector
(used to filer ajax content) is renamed tofilter
; -
You can pass option
selector
to use event delegation instead of directly attaching click event to selected elements; example:$().fancybox({ selector : '[data-fancybox="images"]', loop : true });
-
$.fancybox.isTouch
is renamed toisMobile
-
Callbacks "beforeMove/afterMove/onComplete" are replaced by "beforeShow/afterShow"
-
Improved scrollbar hiding, works better with other modals
-
Improved hash module, it now works better when pressing back button