jquery ajax cannot be submitted, jquery will not submit ajax post request

I have some javascript's gremlins and for some reason my jquery ajax post requests simply won't go out. All my code looks fine, but javascript is not my strong suit, can anyone see where I am going wrong? jquery won't submit ajax post request

$(".deleteWeek").click(function(e){

var answer = confirm("This will delete the selected week. Are you sure?");

if(answer){

$.ajax({

type: 'POST',

url: 'http://localhost/todo/index.php/home/ajax_delete',

data: { page_id : $(this).attr('id') },

success: tableRedraw(data),

dataType: 'html'

})

}

e.preventDefault();

})

and if it helps, my tableRedraw function:

function tableRedraw(data){

$('.week').remove(),

$('thead').after(data)

}

My click events are definitely registered and I can put the handler alerts and they come up ok, but as far as firebug concerns, nothing happens on the Ajax side. Any help would be greatly appreciated.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324130483&siteId=291194637