Handking AJAX in Django

Please Use : instead of = ( in type and url ) otherwise Ajax will not run properly

Actual Code <<<

$.ajax(
{
type=“GET”,
url="/likepost",
data:
{
post_id:catid
},
success: function(data)
{
$(’#like’+catid).remove();
$("#message").text(data);
}
}
)

Changed Code <<<

$.ajax(
{
type:“GET”,
url:"/likepost",
data:
{
post_id:catid
},
success: function(data)
{
$(’#like’+catid).remove();
$("#message").text(data);
}
}
)