0

Good afternoon SO, I am new to Kendo UI and followed the directions on Telerik's site for getting notifications to work. I tested on Telerik's site test tool and the notifications do work as implemented but not on my site. I am using MVC and inlcuded kendo.all.min.js as well as all the .css files in the BundleConfig and it does show them as being implemented when looking into DevTools on Chrome.

I place a

<span id="Notification"></span>

on the the Index page. I then have JavaScript on a separate .js file that initializes the kendo notification.

$('#Notification').kendoNotification({
        position: {
            pinned: false,
            top: 0,
            right: 0
        }
    }).data("kendoNotification");

Then on the successful return of an AJAX call in my JavaScript I call the notification.

$('#Notification').show(" Your item has been saved.", "success");

When I run the code I keep getting this error:

Uncaught TypeError: n.easing[this.easing] is not a function

All the files used on the kendo test site are implemented but I'm not sure why this is happening. Any help is greatly appreciated.

Here is my Kendo example that worked: http://dojo.telerik.com/iWIXO

C. Daniel
  • 141
  • 14
  • The error clues us into the source of the issue. easing is an amination setting from jquery ui. My google-fu shows this error has been solved on stackoverflow before : http://stackoverflow.com/questions/12592279/typeerror-p-easingthis-easing-is-not-a-function – BentOnCoding Nov 20 '15 at 21:08
  • do u include kendo.all.min.js? – Gene R Nov 21 '15 at 07:15
  • Yes, kendo.all.min.js is included in the BundleConfig and shows up on developer tools as being used. – C. Daniel Nov 22 '15 at 13:49

2 Answers2

1

You need to include jqueryUI reference. That should do the trick.

<script src='https://code.jquery.com/ui/1.11.3/jquery-ui.min.js'></scr‌​ipt>

PS: Make sure you include this reference after the jquery reference

Suraj Nair
  • 561
  • 1
  • 8
  • 27
  • he uses kendo ui, he dont need jquery ui, if u look http://dojo.telerik.com/iWIXO there is no jquery ui – Gene R Nov 21 '15 at 07:10
  • @GeneR, you are correct. Kendo ui says that you don't need JQuery UI at all. This is definitely the case because I am able to do other things with Kendo without using JQuery – C. Daniel Nov 22 '15 at 13:50
0

i think it should be this way:

var notification = $('#Notification').kendoNotification({
        position: {
            pinned: false,
            top: 0,
            right: 0
        }
    }).data("kendoNotification");

notification.show(" Your item has been saved.", "success");
Gene R
  • 3,684
  • 2
  • 17
  • 27
  • This worked. I'm not sure why I couldn't just make a reference to the notification and use it that way. Thank you. – C. Daniel Nov 22 '15 at 13:57