7
私は2つのボタンでsweetalertを持っていますが、もう1つのボタンがあります。 たとえば、今のところ、私はyesとnoを持っています。あなたはjQueryのイベントのバインディングでカスタムHTMLを使用する必要があり、それはSweetAlertクラスドンので、あなたが自分でボタンのスタイルを追加する必要がほぼ同じ、唯一の問題を作品事前にsweetalertの2つ以上のボタン2
$("#close_account").on("click", function(e) {
e.preventDefault();
swal({
title: "Are you sure?",
text: "You will not be able to open your account!",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes, close my account!",
closeOnConfirm: false
},
function(){
window.location.href="<?php echo base_url().'users/close_account' ?>"
});
});
感謝:)
おかげコンスタンチン・アジゾフ:) –
どのように任意のアイデアボタンの間に空白を追加するには、 –
@baktetemiloudにクラスを追加します。ボタンを使用し、CSSを使用してスタイルを設定します。 –