Добрый день! Помогите, пожалуйста с ajax.
Код |
---|
<sc ript>
( document ).ready(function(event) {
/* event.preventDefault();*/
$(".item_buttons_counter_block_sect a").click(function() {
$.ajax({
type: "POST",
url: "<?=htmlspecialcharsBack($arItem['ID'])?>",
success: function(){
alert('Добавленно в сравнение.');
}
});
});
}
</sc ript>
<div class="item_buttons_counter_block_sect">
<a href="?action=ADD_TO_COMPARE_LIST&id=<?=$arItem['ID']?>" style="color:grey; margin-left:18px; margin-top: 13px; display: block;">Добавить в сравнение</a>
</div> |