I can't get this short hello-world-like ajax function work for hours.
Uncaught SyntaxError: Unexpected token :
is all the error message.
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('td').click(function(){
$.ajax(function(){
type: 'POST',
url: 'admin_ajax.php',
data: {change_rights:8},
success: function(msg){
alert(msg);
}
});
});
});
</script>