jQuery Bootstrap Message
A simple jQuery plugin that displays info and error messages.
Install with npm:
> npm i bootstrap-message
Usage
Options
All options are optional.
option | values | default | description |
---|---|---|---|
message | any text or html | inner html of the matched element | the message |
type | info, error | info | the type of message |
dismiss | true, false | true | if true, "Click to dismiss" is appended to the message and clicking it will hide the message |
Methods
method | arguments | description |
---|---|---|
show | none | shows the message |
hide | none | hides the message |
options | options | changes the options |
destroy | none | restores the matched element to the state it was in before the message plugin was applied |
Examples
Here's an info message.Here's an error message.Here's an info message without dismiss. Click the following button to change this to an error. Change to Error Click the following buttons to show or hide. Hide Show