New to Kendo UI for jQuery? Download free 30-day trial


The Notification allows you to configure multiple templates.

Each template is used together with its corresponding built-in or custom notification type. If you define a custom template for a built-in notification type, you will no longer be able to use the corresponding built-in template but you will still be able to use the shorthand show methods. For more information, refer to the article on implementing the Kendo UI templates.

<span id="notification"></span>

<script id="myAlertTemplate" type="text/x-kendo-template">
    <div class="myAlert">System alert generated at #= time # : #= myMessage #</div>

    var notificationElement = $("#notification");

        templates: [{
                // Define a custom template for the built-in "warning" notification type.
                type: "warning",
                template: "<div class='myWarning'>Warning: #= myMessage #</div>"
            }, {
                // Define a template for the custom "timeAlert" notification type.
                type: "timeAlert",
                template: "<div class='myAlert'>System alert generated at #= time # : #= myMessage #</div>"
                // The template content can also be defined separately.
                // template: $("#myAlertTemplate").html()

    var n ="kendoNotification");

    // Show a warning message by using the built-in shorthand method.
        myMessage: "some warning message here"

    // Show a "timeAlert" message by using the default show() method.{
        time: new Date().toLocaleTimeString(),
        myMessage: "Server will be restarted."
    }, "timeAlert");

See Also

In this article