title: prettyPhoto with dynamic content JQuery AJAX
body: <p>HELLO i have this code that is loading content via AJAX call, these are vimeo videos and working when i put static code... but not with dynamically loaded content i tried many solution but not working for me
  any help would be appriciated
  here is the code:</p>
  
  <pre><code>$(document).ready(function(){
      $("a[data-rel^='prettyPhoto']").prettyPhoto();
      $(".category").click(function(){
          var categoryid = $(this).data('categoryid');
              $.ajax({
                  url:'&lt;?php echo base_url() ?&gt;main/getPortfolioVideos',
                  type:'POST',
                  data: { category_id: categoryid, page_slug: "index" }
                  }).done(function(data){
                      var rows = $.parseJSON(data);
                      var videodata = "";
                      $(rows).each(function(index, value){
                              $.each(value, function(k, v){
                                  if(k == "video_link"){
                                      videodata += '&lt;article class="entry"&gt; &lt;a data-rel="prettyPhoto" href="http://vimeo.com/'+ v +'"&gt;';
                                      videodata += '&lt;iframe src="http://player.vimeo.com/video/'+ v +'" width="270" height="160" frameborder="0" webkitallowfullscreen="" mozallowfullscreen="" allowfullscreen=""&gt;';
                                      videodata += '&lt;/iframe&gt;&lt;span class="video-hover"&gt;&lt;/span&gt; &lt;/a&gt; &lt;/article&gt;';  
                                  }
                                  console.log(k+":"+v);
                              });
                      })
                      $(".portfolio").html(videodata);
                  });
      });
  });
  </code></pre>