Basic Usage
Select your Element with jQuery and add jBsAlerts to it.
Be sure to add jQuery and Bootstrap before jBsAlerts!
// Include jBsAlerts
<script src="path/to/jBsAlerts/source/jquery.jBsAlerts.min.js"></script>
<script type="text/javascript">
$(function() {
// Add jBsAlerts Alert to #main Container
$('#main').jBsAlerts({message: 'Test Info'});
});
</script>
Options
You can set options as an object for advanced initializing jBsWizard
<script type="text/javascript">
$(function() {
// set option Object like this, i.e. for a success Alert
var options = {
type: 'success',
message: 'Test Success'
}
// Add jBsAlerts Alert to #main Container
$('#main').jBsAlerts(options);
// $('#main').jBsAlerts({type: 'success', message: 'Test Success'}); // Or like this, I don't care ;-)
});
</script>
| Name | Type | Default | Description |
|---|---|---|---|
| type | String | 'info' | 'info', 'success', 'warning' or 'danger' |
| message | String | '' | Will be set to Alert Content. Feel free to add HTML |
| position | String | 'prepend' | 'prepend' or 'append', output on top or at the end from element. |
| addClass | String | '' | Additional Classes for Alert, separated by space |
| autoClose | Boolean | false | true or false, with Type 'success' this is always 'true' |
| acDelay | Integer | 2000 | Set Milliseconds for AutoClose Delay |
| acSpeed | Integer | String | 'fast' | 'fast', 'slow' or Integer See http://api.jquery.com/slideUp/ |
| toast | Boolean | false | Adding Toast functionality, position bottom right. |