diff --git a/docs/index.html b/docs/index.html index b45b1523..3778e18f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -6,7 +6,7 @@ - + @@ -263,7 +263,9 @@

fancyBox3 Documentation

@@ -806,7 +808,8 @@

Options

// Error message template errorTpl : '<div class="fancybox-error"><p>The requested content cannot be loaded. <br /> Please try again later.<p></div>', - closeTpl : '<button data-fancybox-close class="fancybox-close-small">×</button>', + // This will be appended to html content, if "smallBtn" option is not set to false + closeTpl : '<button data-fancybox-close class="fancybox-close-small"></button>', // Container is injected into this element parentEl : 'body', @@ -823,7 +826,7 @@

Options

// Close when clicked outside of the content closeClickOutside : true, - // Callbacks + // Callbacks; See Documentation/API/Events for description and samples beforeLoad : $.noop, afterLoad : $.noop, beforeMove : $.noop, @@ -835,7 +838,6 @@

Options

afterClose : $.noop, onActivate : $.noop, onDeactivate : $.noop - } @@ -1049,7 +1051,6 @@

Events

fancyBox fires several events. -

beforeLoad	 : Before the content of a slide is being loaded
@@ -1094,8 +1095,13 @@ 

Events

</script>

- It is also possible to attach an event handler for all instances. + Each callback receives two parameters - current fancyBox instance and current gallery object, if exists. +

+ +

+ It is also possible to attach event handler for all instances. To prevent interfering with other scripts, these events have been namespaced to .fb. + These handlers receive 3 parameters - event, current fancyBox instance and current gallery object.

Here is an example of binding to the onComplete event: @@ -1106,6 +1112,17 @@

Events

}); +

+ If you wish to prevent closing of the modal, for example, if form is not validating, you can use beforeClose + callback. Simply return false: +

+ +
beforeClose : function( instance, current, e ) {
+	if ( $('#my-field').val() == '' ) {
+		return false;
+	}
+}
+

Modules

@@ -1129,7 +1146,11 @@

Modules

thumbs : { showOnStart : false, // Display thumbnails on opening hideOnClosing : true // Hide thumbnail grid when closing animation starts -} +}, +fullScreen : { + requestOnStart : false // Request fullscreen mode on opening +}, +hash : false // Hash value

Example (show thumbnails on start): @@ -1172,16 +1193,23 @@

Modules

Thumbs.show(); Thumbs.toggle(); -FullScreen.isAvailable(); -FullScreen.isActivated(); -FullScreen.launch(); +FullScreen.request( elem ); FullScreen.exit(); -FullScreen.toggle(); +FullScreen.toggle( elem ); +FullScreen.isFullscreen(); +FullScreen.enabled(); SlideShow.start(); SlideShow.stop(); SlideShow.toggle(); + +

+ If you wish to disable hash module, use this snippet (after including JS file): +

+ +
$.fancybox.defaults.hash = false;
+