我正在使用Bootstrap插件使用Popover进行就地确认框。我想在用户单击是按钮时删除记录。我怎样才能做到这一点? link用于Bootstrap插件
我的按钮
<a href="#" id="@applicant.Id" class="btn btn-outline purple-sharp uppercase" data-btn-ok-label="Bəli" data-toggle="confirmation" data-placement="right" data-original-title="" title="Are you sure?" aria-describedby="confirmation64993">
<i class="fa fa-trash" ></i> Delete
</a>
答案 0 :(得分:3)
<a href="#" id="@applicant.Id" class="btn btn-outline purple-sharp uppercase delete-confirmation" data-btn-ok-label="Bəli" data-toggle="confirmation" data-placement="right" data-original-title="" title="Are you sure?" aria-describedby="confirmation64993">
<i class="fa fa-trash" ></i> Delete
</a>
// You should replace the deleteElement() function with your code
<script>
$('.delete-confirmation').confirmation({
onConfirm: function(event) {
deleteElement();
}
});
</script>