show

Displays a notification.

Parameters

data Object|String|Function

Required. The string content for the notification; or the object with the values for the variables inside the notification template; or the function, which returns the required string or an object.

Important The content will not be HTML-encoded. Use the showText if you only intend to show plain text.

type String

The notification type. Built-in types include "info", "success", "warning" and "error". Custom types should match the types from the template configuration. If this argument is not supplied, then "info" is assumed.

Example - Use the show method with a template and custom arguments

<span id="notification"></span>
<script>
var notificationWidget = $("#notification").kendoNotification().data("kendoNotification");

notificationWidget.show("foo text", "warning");
</script>

Example - use the show method with a function argument

<span id="notification"></span>
<script>
function getNotificationMessage() {
    return {
        myMessage: "foo text"
    }
}

var notificationWidget = $("#notification").kendoNotification({
    templates: [{
        type: "myAlert",
        template: "<div>System alert: #= myMessage #</div>"
    }]
}).data("kendoNotification");

notificationWidget.show(getNotificationMessage, "myAlert");
</script>
In this article