开发者

Can not figure out jquery error

开发者 https://www.devze.com 2023-03-22 01:03 出处:网络
I can\'t figure out where the error is in this. Does anyone see it? $(\'.ask\').jConfirmAction( { question : \"Are you sure you want to delete the selected row?\",

I can't figure out where the error is in this. Does anyone see it?

$('.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();    
}


You have an extra comma here:

data: dataString, 
   });
0

精彩评论

暂无评论...
验证码 换一张
取 消