热门IT资讯网

jquery基础教程-jquery创建一个确认对话框

发表于:2024-11-27 作者:热门IT资讯网编辑
编辑最后更新 2024年11月27日,$(document).ready(function(){$('.item .delete').click(function(){varelem = $(this).closest('.item');


$(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和下载)



0