tape-alert
v1.0.3
Published
Simple inline alert
Downloads
2
Readme
tape-alert
Simple inline alerts
Requirements
jQuery >= v2.1.0
Installation
CSS:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tape-alert/dist/tape-alert.css">
JS:
<script src="https://cdn.jsdelivr.net/npm/tape-alert/dist/tape-alert.jquery.js"></script>
Usage
The tape-alert
append the alerts in a given container.
<div id="errors"></div>
<div id="warnings"></div>
$('#errors').tape({
title: 'Error',
text: ['Required fields are empty'],
status: 'error',
});
$('#warnings').tape({
title: 'This is a Warning!',
text: ['You have 2 minutes to complete the form'],
status: 'warning',
});
Options
{
title: '',
text: '', // Use string or array
status: '' // error, success, info, warning. Default: error
}
Todo
- Delay to hide the tape.
- Custom classes.