I upgraded my jQuery version to 1.4 from 1.3. My code worked fine in 1.3, but it doesn't in 1.4. What can I have done wrong?
function add_product_to_shopping_cart( product_id )
{
$.post("/actions/etrade/add_product_to_cart",
{
'product_id': product_id,
'variant_first': $('#main_variant-'+ product_id ).val(),
'variant_secound': $('#secound_variant-'+ product_id ).val(),
'stock': $('#stock-'+ product_id ).val()
}, function(data) {
if ( data.err == 0 )
{
$('#cart_count').html( data.item_count );
$('#cart_price').html( data.cart_total_price );
$('#cart_shop_more').fadeIn();
}
else
{
alert( data.err_msg );
}
alert('test');
},"json");
}
Thanks a lot all for helping me :)