1swal({
2 title: "Deleted!",
3 text: "Your row has been deleted.",
4 button: "Close", // Text on button
5 icon: "success", //built in icons: success, warning, error, info
6 timer: 3000, //timeOut for auto-close
7 buttons: {
8 confirm: {
9 text: "OK",
10 value: true,
11 visible: true,
12 className: "",
13 closeModal: true
14 },
15 cancel: {
16 text: "Cancel",
17 value: false,
18 visible: true,
19 className: "",
20 closeModal: true,
21 }
22 }
23 });
1$.sweetModal.prompt('Can I haz cheezeburger?', 'Can I?', 'Nope', function(val) {
2 $.sweetModal('You typed: ' + val);
3});
1$.sweetModal({
2 title: 'HTML Content',
3 content: 'You can place <b>anything</b> <i>you</i> want in here.'
4});
1$.sweetModal({
2 title: {
3 tab1: {
4 label: 'Tab 1'
5 },
6
7 tab2: {
8 label: 'Tab 2'
9 }
10 },
11
12 content: {
13 tab1: 'Tab 1',
14 tab2: 'Tab 2'
15 },
16
17 buttons: {
18 someOtherAction: {
19 label: 'Action 2',
20 classes: 'secondaryB bordered flat',
21 action: function() {
22 return $.sweetModal('You clicked Action 2!');
23 }
24 },
25
26 someAction: {
27 label: 'Action 1',
28 classes: '',
29 action: function() {
30 return $.sweetModal('You clicked Action 1!');
31 }
32 },
33 }
34});