I want to update this number through client’s api : http://data.memopresso.com/api/data/count
where should I put the script code?
<script>
getPrintCount();
function getPrintCount(){
$.ajax({
url: 'http://data.memopresso.com/api/data/count',
dataType: 'json',
type: 'get',
cache: false,
success: function(data){
document.getElementById("printCount").innerHTML = data.count;
},
error: function(data){
document.getElementById("printCount").innerHTML = '0';
}
});
}
</script>