swal with input code example

Example 1: sweet alert

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>

Example 2: sweet alert bootstrap

Swal.fire({  icon: 'success',  title: 'Oops...',  text: 'Something went wrong!',  footer: '<a href>Why do I have this issue?</a>'})

Example 3: sweet alert bootstrap

Swal.fire(  'Good job!',  'You clicked the button!',  'success')

Example 4: jquery sweet popup

$.sweetModal({
	title: {
		tab1: {
			label: 'Tab 1'
		},

		tab2: {
			label: 'Tab 2'
		}
	},

	content: {
		tab1: 'Tab 1',
		tab2: 'Tab 2'
	},

	buttons: {
		someOtherAction: {
			label: 'Action 2',
			classes: 'secondaryB bordered flat',
			action: function() {
				return $.sweetModal('You clicked Action 2!');
			}
		},

		someAction: {
			label: 'Action 1',
			classes: '',
			action: function() {
				return $.sweetModal('You clicked Action 1!');
			}
		},
	}
});

Tags:

C Example