// 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 @@
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:
+