title: rerun scripts after ajax load
body: <p>I'm trying to load a content into a div with this:</p>
  
  <pre><code> $(document).ready(function(){
  
  
      $(".produkty").click(function(){
          var post_id = $(this).attr("href");    
          $("#single_product_box").load(post_id + " #main" );
          return false;
       });
  });
  </code></pre>
  
  <p>The other scripts I use are here: </p>
  
  <pre><code>  &lt;script src="//code.jquery.com/jquery-1.11.0.min.js"&gt;&lt;/script&gt;
      &lt;script src="&lt;?php echo get_template_directory_uri(); ?&gt;/js/jcarousellite_1.0.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
     &lt;script&gt;
  
  
     $(function() {
         $(".anyClass").jCarouselLite({
           btnNext: ".next-any",
           btnPrev: ".prev-any"
         });
     });
     $(function() {
         $(".anyClass-2").jCarouselLite({
           btnNext: ".next-any2",
           btnPrev: ".prev-any2"
  
         });
     });
  </code></pre>
  
  <p>Everything is fine, but after first load it stopped working. I've tried to use something like this:</p>
  
  <pre><code> $.ajax({
      url: '$post_id',
      cache: false,
      beforeSend: function (data) {
          $('#single_product_box').html("Loading...");
      },
      success: function (data) {
          if (data!='error'){
              $('#single_product_box').html(data);
          }else{
              $('#single_product_box').html("&lt;span style='color:red;'&gt;Error!&lt;/span&gt;");
          }
      },
      error: function (data) {
          $('#single_product_box').html("&lt;span class='error'&gt;Error!&lt;/span&gt;");
      }
  });
  </code></pre>
  
  <p>but I cannot make it work again, I even tried to put the scripts into loaded content, but it disappears as well. I just had no more ideas.</p>