title: Initializing prettyPhoto using Isotope
body: <p>I'm having trouble initializing prettyPhoto now that I've switched from QuickSand to Mettafizzy Isotope.</p>
  
  <p>Through posts here I've tried the code below with the onLayout function,
  and by trying to bind and trigger</p>
  
  <p><a href="https://stackoverflow.com/questions/9236945/define-call-a-function-in-isotope-onlayout#_=_">https://stackoverflow.com/questions/9236945/define-call-a-function-in-isotope-onlayout#<em>=</em></a></p>
  
  <p>I'm new to javascript/jQuery... so any help is much appreciated.</p>
  
  <p>_Cindy</p>
  
  <p>PS I'm using prettyPhoto for its social sharing features. Any other lightboxes with sharing features that anyone likes using -- I'd appreciated recommendations.</p>
  
  <pre><code>$(document).ready(function() {
  var $container = $('.gallery');
  $container.isotope({
      filter: '*',
      animationOptions: {
      duration: 850,
          easing: 'linear',
        queue: false
      }
  });
  
  $('.gallery').isotope({
      onLayout: function() {
      $("a[data-rel^='prettyPhoto']").prettyPhoto({ animationSpeed: 'slow', slideshow: 2000 });
      }
  });
  
  $('.filter ul li a').click(function(){
      $('.filer ul li .current').removeClass('current');
      $(this).addClass('current');
  
      var selector = $(this).attr('data-filter');
      $container.isotope({
          filter: selector,
          animationOptions: {
              duration: 850,
              easing: 'linear',
              queue: false
          }
       });
       return false;
  });
  
  
  });
  </code></pre>