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

c# - passing input text from view to contoller with FacebookContext using Facebook app -

ios - Does Core Data autoupdate a many to many relationship on saving -

Calling a C++ function from C# by passing a string with variable size to it -