Hi, I have been receiving the error "0x800a138f - JavaScript runtime error: Unable to get property 'show' of undefined or null reference". I've looked over my code and examined my javascript function, but I have been unable to find any errors. Why would the .show error out on me?
My Code looks as follows:
@(Html.Kendo().Notification()
.Name("#popupNotification")
.Width("100%")
.Position(p => p.Pinned(true).Top(30).Right(30))
.Stacking(NotificationStackingSettings.Down)
.AutoHideAfter(7000)
.Templates(t =>
{
t.Add().Type("info").ClientTemplateID("popupTemplate");
})
)
<button id="showNotification" class="k-button">Notification</button><br />
<script id="popupTemplate" type="text/x-kendo-template">
<div class="">
<h3>#= title #</h3>
<p>#= message #</p>
</div>
</script>
<script>
$(document).ready(function() {
var popupNotification = $("#popupNotification").data("kendoNotification");
$("#showNotification").click(function() {
popupNotification.show ({
title: "New Notification",
message: "Test"
}, "info");
});
});
</script>