D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
realadss
/
kavyaeventz.in
/
backup
/
js
/
pages
/
Filename :
gallery.js
back
Copy
//[Javascript] $(function () { "use strict"; // delegate calls to data-toggle="lightbox" $(document).delegate('*[data-bs-toggle="lightbox"]:not([data-bs-gallery="navigateTo"])', 'click', function(event) { event.preventDefault(); return $(this).ekkoLightbox({ onShown: function() { if (window.console) { return console.log('Checking our the events huh?'); } }, onNavigate: function(direction, itemIndex) { if (window.console) { return console.log('Navigating ' + direction + '. Current item: ' + itemIndex); } } }); }); //Programatically call $('#open-image').click(function(e) { e.preventDefault(); $(this).ekkoLightbox(); }); $('#open-youtube').click(function(e) { e.preventDefault(); $(this).ekkoLightbox(); }); // navigateTo $(document).delegate('*[data-bs-gallery="navigateTo"]', 'click', function(event) { event.preventDefault(); var lb; return $(this).ekkoLightbox({ onShown: function() { lb = this; $(lb.modal_content).on('click', '.modal-footer a', function(e) { e.preventDefault(); lb.navigateTo(2); }); } }); }); }); // End of use strict