Class name

E.controls.notifications (0.1.0)

Methods

Method Parameters Returns Description Example
build string Build string of component markup build()
append jquery selector
defaults to body
boolean Build and append string to DOM append('#mydiv')
bubble this Set bubble display mode bubble()
bar this Set top bar display mode bar()
embed this Set top bar of current div display mode embed()
delay positive integer this Set delay in seconds before notification leaves (default is 3) delay(2)
success callout, text Push success message to notification control success( 'Success', 'It works' )
info callout, text Push info message to notification control info( 'Info', 'You have been informed' )
warning callout, text Push warning message to notification control success( 'Warning', 'You have been warned' )
danger callout, text Push danger message to notification control info( 'Danger', 'Last chance to turn back' )

Usage

Create instance of control

var n = $E('notifications');

Set mode

n.bubble();

Set default message timeout

n.delay(5);

Append to DOM

n.append('body');

Create message

n.info( 'Information', 'Notification system working' );
Last modified: 2016-02-08