title: jQuery Re initialize MagnificPopup after ajax loading
body: <p>I am running into a problem with this function and my Ajax pagination. On the first page of results, this popup works perfectly. But when I use the Ajax pagination, and the next set of results loads, this function no longer works. I guess it needs to be initialized with each ajax refresh? How do I alter the below code accordingly?</p>
  
  <p><code>jQuery(window).load(function(){
    jQuery('.open-popup-link').magnificPopup({
      type:'iframe',
      alignTop: true,
      overflowY: 'scroll',
      midClick: true 
    });
  });</code></p>
  
  <p>Thank you!! :)</p>
  
  <hr>
  
  <p>Thank you MarkPlewis! I am using Search &amp; Filter Pro. They provide the following snippet to use to reinitialize your jquery with ajax... How can I implement the first snippet of code I posted, with the following? `//detects the start of an ajax request being made</p>
  
  <p><a href="https://gist.github.com/rmorse/b157004c68870dbd9fb9" rel="nofollow">https://gist.github.com/rmorse/b157004c68870dbd9fb9</a></p>
  
  <p>`
                  $(document).on("sf:ajaxstart", ".searchandfilter", function(){
                    console.log("ajax start");
                  });</p>
  
  <pre><code>            //detects when the ajax request has finished and the content has been updated
              // - add scripts that apply to your results here
              $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
                  console.log("ajax complete");
                  //so load your lightbox or JS scripts here again
              });
  
              //an event fired when S&amp;F is initialised and S&amp;F scripts have been loaded
              $(document).on("sf:init", ".searchandfilter", function(){
                  console.log("S&amp;F JS initialised");
              });
  </code></pre>
  
  <p>`</p>