v3.1.20
-
It is now possible to disable or customize open/close/transition animations
-
fancyBox is now multilingual, you can set language using
langoption and add new language usingi18n -
Changed default content type from "iframe" to "image" to avoid typical confusion
when using links likeimage.php?id=123without specifying content type;
this means that you have to setdata-type="iframe"for your iframe links; -
Simplified manual calling, it now works without using
optsoption (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
closeTplis now replaced bybtnTpl.smallBtn -
Removed option
closeClickOutside -
New options
clickContent,clickSlide,clickOutsideto handle click events (possible values: "close", "next", "nextOrClose", "toggleControls", "zoom", false or function) -
Unified module option naming; "thumbs", "fullScreen" and "slideShow" now have
autoStartoption
that replaces previously usedshowOnStart/requestOnStartoptions. -
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
selectorto use event delegation instead of directly attaching click event to selected elements; example:$().fancybox({ selector : '[data-fancybox="images"]', loop : true }); -
$.fancybox.isTouchis 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