jquery基礎教程-jquery創建一個確認對話框

wKioL1LFi2iBsdMKAAA6xHsT3dY694.jpg


$(document).ready(function(){
$('.item .delete').click(function(){
varelem = $(this).closest('.item');
$.confirm({
'title': 'Delete Confirmation',
'message': 'You are about to delete this item.
It cannot be restored at a later time! Continue?',
'buttons': {
'Yes': {
'class': 'blue',
'action': function(){
elem.slideUp();
}
},
'No': {
'class': 'gray',
'action': function(){}// Nothing to do in this case. You can as well omit the action property.
}
}
});
});
});



文章詳情(附demo和下載)



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章