I have an mvc application that shows the purchasing history of a client. When a client clicks on a specific order from his purchase history, I show the user a list of the products that where on the selected order. Till here everything works well. Now when the use clicks on a product from the selected order, I get the current product details using $.ajax returning an html result from a partial view and show it in a jquery.dialog. It works find except that I have a button in the popup with class="addToCart", in the main page I have
$(".addToCart").on(click, function(e){
....
});
but this command is never called except if i add this script in the partial view.
Any idea?