无法弄清楚jquery错误

时间:2011-07-21 00:33:02

标签: jquery

我无法弄清楚错误在哪里。有人看到了吗?

$('.ask').jConfirmAction( {
    question : "Are you sure you want to delete the selected row?", 
    yesAnswer : "Yes", 
    cancelAnswer : "No", 
    onYes: function( evt ) { 
      contentpages( evt.target ); 
    }
} );

$('.ask2').jConfirmAction( {  
   question : "Are you sure you want to delete all selected rows?",  
questionClass: "question2", 
onYes: function( evt ){  
contentpages( evt.target ); 
}  
} );

function contentpages(whatsThis) {
    var contentPageID = $(whatsThis).parents('td').find('img').attr('id');
    var dataString = 'contentPageID=' + contentPageID + '&deleteContentPage=True'; 
    $.ajax({ 
        type: "POST", 
        url: "processes/contentpages.php", 
        data: dataString, 
    });
    $(whatsThis).parents("tr").eq(0).hide();    
}

1 个答案:

答案 0 :(得分:3)

这里有一个额外的逗号:

data: dataString, 
   });