Sweet AlertというJQueryプラグインを使っています。
アラートウィンドを自動でデザインしてくれるものです。
http://t4t5.github.io/sweetalert/
こちらの中のデモにある、
「A warning message, with a function attached to the "Confirm"-button...」というやつをカスタマイズしたいと思っています。
具体的には、Yes!Delete it!を押したあとで、特定のテキストやスタイルを変更したりしたいです。
(アラートのテキスト・スタイルではなく、サイト上のテキスト)
Javascript
1swal({ 2 title: "Are you sure?", 3 text: "You will not be able to recover this imaginary file!", 4 type: "warning", 5 showCancelButton: true, 6 confirmButtonColor: "#DD6B55", 7 confirmButtonText: "Yes, delete it!", 8 closeOnConfirm: false 9}, 10function(){ 11 swal("Deleted!", "Your imaginary file has been deleted.", "success"); 12 ●●●● 13});
●●●●のエリアに、
javascript
1$(this).text('テキスト'); 2
など書いてみても反映されずに苦戦しています。
実装方法を教えて頂けますと幸いです。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。