S
S
Sergey2018-02-16 08:58:34
css
Sergey, 2018-02-16 08:58:34

How to open and close magnific popup on page scroll?

How to open and close magnific popup on page scroll?
I use ScrollMagic + GSAP plugins. It is possible without them.

Or is it better to ask. How to set all the necessary parameters in the magnificPopup () function, but so that it only takes effect in another function (in a certain place). The other function is a function that keeps track of the scrolling of the page - if scrolled to a certain point, magnificPopup('open') is called.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tyzberd, 2018-02-16
@tyzberd

$('.element-with-popup').magnificPopup('open'); // Will open the popup
$('.element-with-popup').magnificPopup('open', 5); // Will open popup with 5th item

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question