<div class="message success" data-ride="message" data-duration="2000">
<div class="inner">hello, im a message <a href="#" title="">link here</a>.</div>
<span class="close">×</span>
</div>
<div class="message bottom warning" data-ride="message">
<div class="inner">hello, im a message.</div>
<span class="close">×</span>
</div> Message plugin already export to window object.
Click these buttons run the javascript code.
<p>Click these buttons run the javascript code.</p>
<button class="info" id="message-show">show</button>
<button class="info" id="message-auto-hide">
show & hide automaticlly
</button>
<button class="info" id="message-hide">hide</button>
<button class="info" id="message-at-bottom">show at bottom</button>
<button class="info" id="message-with-status">show with status</button> | Name | Type | Default | Description |
|---|---|---|---|
| template | string | '<div class="message"><div class="inner"></div><span
class="close">×'</span></div>' |
Base HTML to use when creating the message. The message's content will be injected into
the .inner.
.close will become the message's close. The outermost wrapper element should have
the .message class.
|
| message | string|object | null |
'message content text/html' message: 'text/thml', placement: 'bottom', status: 'danger' |
| placement | string | top | The placement can be `top` or `bottom`, by default is `top` |
| status | string | '' | Show with status, add class `[default]| success| info| warning| danger` to the container. |
| duration | number | null | Message hide automaticlly after a number |
Attaches a message handler to an element collection.
Show the message.
$('#element').message('show') Hide the message.
$('#element').message('hide') Toggles the message.
$('#element').message('toggle') Hide and destroys the message.
$('#element').message('destroy')