Notify.js is a jQuery plugin to provide simple yet fully customisable notifications. The javascript code snippets in this documentation with the $(".elem-demo").notify("Hello Box");0 edge are runnable by clicking them. $.notify("Hello World"); Element NotificationsYou can place notifications on any element: $(".elem-demo").notify("Hello Box"); Like this box Global NotificationsIf you don't specify an element, notification will appear in the top left (unless you specify a different position - See Positioning) $.notify("I'm over here !"); Notification StylesEach style may define a set of classes to use to substyle the notification. The pre-packaged version includes a bootstrap notification style (see more below in Styling). These classes include: Success $.notify("Access granted", "success");Info $.notify("Do not press this button", "info");Warning $.notify("Warning: Self-destruct in 3.. 2..", "warn");Error $.notify("BOOM!", "error"); Note: This page has set the default class to $(".elem-demo").notify("Hello Box");1 with $(".elem-demo").notify("Hello Box");2. PositioningThe $(".elem-demo").notify("Hello Box");3 string option is used to describe both vertical and horizontal alignment. Element notifications and Global notifications can be vertically repositioned to: $(".elem-demo").notify("Hello Box");4, $(".elem-demo").notify("Hello Box");5or $(".elem-demo").notify("Hello Box");6and horozontally repositioned to: $(".elem-demo").notify("Hello Box");7, $(".elem-demo").notify("Hello Box");8or $(".elem-demo").notify("Hello Box");9. If we don't provide a $(".elem-demo").notify("Hello Box");3 option the default alignments are defined in the default settings: $.notify("I'm over here !");1 and $.notify("I'm over here !");2. When only one alignment is provided, the vertical alignment is $.notify("I'm over here !");3 and horizontal alignment is $.notify("I'm over here !");4. $(".pos-demo").notify( "I'm to the right of this box", { position:"right" } ); We can position the notification around this box Use this positioning tool to see all possible $(".elem-demo").notify("Hello Box");3 combinations. An awesome cool larrrggggeeee box API
|