Skip to content
This repository was archived by the owner on May 22, 2020. It is now read-only.

Commit 5e4f415

Browse files
author
Chase Peeler
committed
Supports callbacks for the dataSrc, titleSrc, and footerSrc configuration options.
1 parent bcbb3e4 commit 5e4f415

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

dist/ekko-lightbox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ var Lightbox = (function ($) {
269269
value: function _getAttr(element, attr) {
270270
if (0 === attr.indexOf("data-")) {
271271
return $(element).data(attr.replace("data-", ""));
272+
} else if (typeof attr === 'function') {
273+
return attr.call(element);
272274
} else {
273275
return $(element).attr(attr);
274276
}

dist/ekko-lightbox.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ekko-lightbox.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ekko-lightbox.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ekko-lightbox.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,8 @@ const Lightbox = (($) => {
274274
_getAttr(element,attr){
275275
if(0 === attr.indexOf("data-")){
276276
return $(element).data(attr.replace("data-",""));
277+
} else if(typeof attr === 'function') {
278+
return attr.call(element);
277279
} else {
278280
return $(element).attr(attr);
279281
}

0 commit comments

Comments
 (0)