0
我怎樣才能刷新成功的div而不是使用Ajax刷新整個頁面?刷新成功div而不是使用Ajax刷新整個頁面?
$('a.add-to-cart').click(function (e) {
var url = "<?php echo createItemLink($row['id']);?>";
e.preventDefault();
$.ajax({
type: 'post',
url: "<?php echo SITEURL;?>/ajax/addtoCart.php",
data: 'itemid=<?php echo $row['id'];?>&price=<?php echo $row['price'];?>&name=<?php echo $row['title'];?>',
success: function (msg) {
$("#status").fadeIn(300).delay(800).fadeOut(300).ajaxComplete(function (event, request, settings) {
$(this).html(msg);
$(location).attr('href',url);
});
}
});
});
看起來更換喜歡你解決了它的div的類名!你真棒謝謝! – JonnyPlow 2011-06-16 00:43:42