Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- function refreshLikesCount(petkey,idFollow){
- alert("pepe");
- $.ajax({
- url: "<?php echo $GLOBALS["baseURL"];?>crud.php?view=lista-peticiones&action=likePetition&act=like&petitionKey"+petkey,
- //data: { view:"lista-peticiones",action:"likePetition",act:"like",petitionKey:petkey,decoded:"false"},
- type: "POST",
- dataType: "json",
- timeout:10000,
- error: function(XMLHttpRequest, textStatus, errorThrown){
- //alert(errorThrown);
- },
- success: function(data){
- alert("success");
- $('#number'+idFollow).click(function(){
- $(this).append(data.likescount);
- });
- }
- });
- }
- -----------------
- <a class = "follow" OnClick= "refreshLikesCount('<?php $petition->key;?>','<?php echo $count;?>');"> </a>
Add Comment
Please, Sign In to add comment