我正在将ekko-lightbox用于我的网站。它可以在localhost中运行,但不能实时运行。我的代码是:
<script language="javascript">
$(document).on('click', '[data-toggle="lightbox"]', function(event) {
event.preventDefault();
$(this).ekkoLightbox();
});
</script>
<a href="uploads/Wed1.jpg" data-toggle="lightbox" data-gallery="example-gallery">
<img src="uploads/Wed1.jpg" alt="">
</a>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.js"> </script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js"> </script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css"/>