D
D
dzenn2016-10-24 15:56:09
JavaScript
dzenn, 2016-10-24 15:56:09

How to implement open popups on click?

How to implement the opening of lightboxes, taking into account the fact that they will be dynamically added from the admin panel?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kovalsky, 2016-10-24
@lazalu68

Lightboxes? Does this mean you are using lightbox.js ?
If so, then their instructions say that it is enough to add the data-lightbox attribute to the pictures, which, by the way, groups the pictures.
If you're using bootstrap modals, it's just as easy. To open a modal window, you need to attach the data-toggle and data-target attributes to the buttons , in the latter - the hash and ID of the modal window:
Programmatically like this:

$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question