title: flexslider doesn't work within ajax Magnific popup
body: <p>I'm trying to load flexslider within magnific popup, but for some reason the script inside the popup doesn't work.</p>
  
  <p>Magnific pop up is load with wordpress function <code>wp_enqueue_script()</code>:</p>
  
  <pre><code>jQuery(document).ready(function($){
  
          $('.ajax-popup-link').magnificPopup({
              type:'ajax',
              midClick: true,
              overflowY: "scroll",
              alignTop: false,
          });
  });
  </code></pre>
  
  <p>Then, by clikcing a button the pop up opens this file:</p>
  
  <pre><code>&lt;div class="container"&gt;
  
    &lt;div class="popup-container"&gt;
  
      &lt;?php
      // Loop start
      if( have_posts() ):
  
        while( have_posts() ) : the_post();
  
          get_template_part( 'agency', 'popup' );
  
        endwhile;
  
      else :
  
        echo "no agencies found";
  
      endif;
      ?&gt;
  
  
  
    &lt;/div&gt;&lt;!--.popup-container--&gt;
  
  &lt;/div&gt; &lt;!--.container --&gt;
  </code></pre>
  
  <p>Inside agency-popup.php:</p>
  
  <pre><code>&lt;div class="flexslider"&gt;
    &lt;ul class="slides"&gt;
      &lt;li&gt;
        &lt;img src="slide1.jpg" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;img src="slide2.jpg" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;img src="slide3.jpg" /&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;img src="slide4.jpg" /&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  
   jQuery(document).ready(function($) {   
      $(window).load(function() {
             $('.flexslider').flexslider({
                animation: "slide"
            });
       });
    });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>But the jquery doesn't load.. I've tried to add it inside the page where the button is, and inside the <code>&lt;head&gt;&lt;/head&gt;</code> section, in both case it doesn't work either.
  NOTE: I've loaded flexslider with <code>wp_enqueue_script()</code> and checked that it enqueued, and it did.</p>