javascript - Jquery functions and infinite scroll elements -


I have a script that pops up windows for every link attached to the class

  JQuery (document) .ready (function () {jQuery ('product-quick-view A'). MagnificPopup ({type: 'ajax', midclick: true, main class: 'mfp-fade'});});   

And it works fine but only for those elements which are shown on the first page. When I scroll down the page and add the next products on the infinite scroll page, then the script is used to work (for that product).

I think you need to add it:

  $ (Document) .ajaxSuccess (function () {jQuery ('product-quick-view one'). MagnificPopup ({type: 'ajax', midclick: true, main class: 'mfp-fade'}););   

The above will be executed whenever an AJAX will be successfully completed.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -