Download
Demo
- Overview
- Documents
User Rating: 3.5/5 ( 3 votes)
Your Rating:
jQuery Confirm is a jQuery plugin that provides great set of features like, Auto-close, Ajax-loading, background-dismiss, themes and more.
Dependencies:
- Bootstrap by Twitter > v2
- jQuery library > v1.8
-
sex shop
sex shop
sex shop
sex shop
sex shop
seks shop
spanish fly
psikolog
sohbet numara
sohbet hatti
Source: craftpip.github.io
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" href="demo/libs/bootstrap.min.css"> <link rel="stylesheet" href="demo/libs/bootstrap-theme.min.css"> <link rel="stylesheet" href="demo/libs/font-awesome.min.css"> <link rel="stylesheet" href="demo/libs/default.min.css"> <script src="demo/libs/jquery.min.js"></script> <script src="demo/libs/bootstrap.min.js"></script> <script src="demo/libs/pretty.js"></script>
2. HTML
<button class="btn btn-primary btn-block example-p-1">Alerts</button>
3. JAVASCRIPT
$('.example-p-1').on('click', function () {
$.alert({
title: 'Attention',
content: 'This is some alert to the user. <br> with some <strong>HTML</strong> <em>contents</em>',
confirmButton: 'Okay',
confirmButtonClass: 'btn-primary',
icon: 'fa fa-info',
animation: 'zoom',
confirm: function () {
alert('Okay action clicked.');
}
});
});
4. OPTIONS
Options, their defaults and possibilities.
| Name | type | default | description |
|---|---|---|---|
| title | String | 'Hello' | Title of the dialog. |
| content | String | 'Are you sure to continue?' | Content for the dialog. |
| icon | String | '' | Icon class prepended before the title. |
| confrimButton | String | 'Okay' | Button text for the confirm callback. |
| cancelButton | String | 'Cancel' | Button text for the cancel callback. |
| confirmButtonClass | String | 'btn-default' | Class for the confirm button. |
| cancelButtonClass | String | 'btn-default' | Class for the cancel button. |
| theme | String | 'white' |
Color theme for the dialog. possible options are 'white' & 'black' |
| animation | String | 'scale' |
Open & Close animation for the dialog. possible options are 'scale', 'top', 'bottom', 'left', 'right', 'zoom', 'opacity', 'none', 'rotate', 'rotatex', 'rotatey', 'scalex', 'scaley', 'blur'. |
| animationSpeed | Number | 400 | Animation duration in miliseconds. |
| confirm | Function | function(){} | function to run after the user clicks the confirm button. |
| cancel | Function | function(){} | function to run after the user clicks the cancel button. |
| backgroundDismiss | Boolean | true | if the user can dismiss the dialog via clicking outside the dialog. |
| autoClose | String | false |
Auto-close the dialog within a specified time, if the user doesn't respond. possible option 'confirm|400' the string is divided in two halves with '|', the first part specifies the button to trigger,'confirm' or 'cancel'. The other half specifies the wait time in miliseconds. |
| closeIcon | Boolean | true |
Close icon comes into picture if both the buttons are disabled, (dialog mode). You may remove the close icon by settings this value to false. |
5. METHODS
close()
On calling the $.alert or $.confirm function, it returns a reference object. You can use this object to access the dialog.
var obj = $.alert({
title: 'Closing this in 2 seconds.',
content: 'Closing me via SetTimeout for demonstration.'
})
setTimeout(function(){
// some point in future.
obj.close();
},2000);
6. THEMES
The light & dark themes that suit any website design,
HoloLight and HoloDark themes for android web apps.
$.confirm({
theme: 'white'
});
$.confirm({
theme: 'black'
});
$.confirm({
theme: 'hololight'
});
$.confirm({
theme: 'holodark'
});
JS Tutorial
