I would like to display total amount of likes on page, the likes are displayed in:
<input type="tekst" id="<?php echo $item->getId();?>">
add like function button:
$(function () {
$('a.like').on('click', function () {
var url = $(this).attr('href');
$.post(url, {}, function () {
});
return false;
});
});
So not I have to click on $('a.like') and then refresh page to see the like added, I would like to skip refreshing the page. Any ideas?
EDIT there is also a script:
<script>
document.getElementById("<?php echo $item->getId();?>").value =<?php echo getVotesValue($item->getId());?>
</script>