title: Load Javascript into ajax loaded content
body: <p>I am new to working with AJAX and have some experience with Java/Jquery. I have been looking around for an solution to my problem but i cant seem to find any.</p>
  
  <p>I am trying to build a function in a webshop where the product will appear in a popup window instead of loading a new page.</p>
  
  <p>I got it working by using this code:</p>
  
  <pre><code>$(".product-slot a").live('click', function() {
    var myUrl = $(this).attr("href") + " #product-content";
    $("#product-overlay-inner").load(myUrl, function() {
    });
    $("#product-overlay").fadeIn();
    return false;
  });
  </code></pre>
  
  <p>product-slot a = Link to the product in the category page.<br>
  product-content = the div i want to insert in the popup from the product page.<br>
  product-overlay-inner = The popup window.<br>
  product-overlay = The popup wrapper.<br></p>
  
  <p>The problem that i now have is that my Javascript/Jquery isnt working in the productpopup. For example the lightbox for the product image or the button to add product to shoppingcart doesnt work. Is there anyway to make the javascript work inside the loaded content or to load javascript into the popup?</p>
  
  <p>I hope you can understand what my problem is!</p>
  
  <p>Thank you in advance!</p>
  
  <p><strong>EDIT: The platform im using has jquery-ui-1.7.2</strong></p>