Account for callbacks in 'fancybox'.

This commit is contained in:
Daniel Rosenwasser
2015-08-11 16:37:53 -07:00
parent b1d60d580d
commit 722357fe99
2 changed files with 12 additions and 12 deletions

View File

@@ -116,7 +116,7 @@ $(".fancybox").fancybox({
}
});
$(".fancybox").fancybox({
beforeLoad: function () {
beforeLoad: () => {
this.title = 'Image ' + (this.index + 1) + ' of ' + this.group.length + (this.title ? ' - ' + this.title : '');
}
});

View File

@@ -6,7 +6,7 @@
/// <reference path="../jquery/jquery.d.ts" />
interface FancyboxOptions {
interface FancyboxOptions extends FancyboxCallback {
padding?: any; // number or []
margin?: any; // number or []
width?: any; // number or []
@@ -96,16 +96,16 @@ interface FancyboxMethods {
}
interface FancyboxCallback {
onCancel;
beforeLoad;
afterLoad;
beforeShow;
afterShow;
beforeClose;
afterClose;
onUpdate;
onPlayStart;
onPlayEnd;
onCancel?: Function;
beforeLoad?: Function;
afterLoad?: Function;
beforeShow?: Function;
afterShow?: Function;
beforeClose?: Function;
afterClose?: Function;
onUpdate?: Function;
onPlayStart?: Function;
onPlayEnd?: Function;
}
interface FancyboxThumbnailHelperOptions {