Hi everyone,
I'm using jquery in this piece of script and also trying to call the functions. But, they aren't working at ALL and the firefug is saying that there is an error in the script. The error is
missing ) in parenthetical
[Break On This Error]$.post('ajax/like_add.php', (article_id:article_id), function(data){
and the firebug points to the colon.
This is the entire piece of script that has both functions.
function like_add(article_id){
$.post('ajax/like_add.php', (article_id:article_id), function(data){
if(data == 'success'){
like_get(article_id);
}else{
alert(data);
}
});
}
function like_get(article_id){
$.post('ajax/like_get.php',(article_id:article_id), function(data){
$('#article_'+article_id+'_likes').text(data);
});
}
Thanks, folks.