Skip to content

Commit

Permalink
improve registration of click event for lightbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Jul 9, 2023
1 parent 4162705 commit e118894
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions adm_program/modules/photos/photos.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,8 @@ function(data) {
$page->addCssFile(ADMIDIO_URL . FOLDER_LIBS_CLIENT . '/lightbox/ekko-lightbox.css');
$page->addJavascriptFile(ADMIDIO_URL . FOLDER_LIBS_CLIENT . '/lightbox/ekko-lightbox.js');

$page->addJavascript(
'
$(document).delegate("*[data-toggle=\"lightbox\"]", "click", function(event) {
$page->addJavascript('
$("*[data-toggle=\"lightbox\"]").click(function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});',
Expand Down

0 comments on commit e118894

Please sign in to comment.