0

Running into an issue with KendoUi and the latest version of jQuery ... I have simple ASP.NET MVC project with a single view that renders as follows:

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width" />
    <title>Index</title>
    <link href="/Content/site.css" rel="stylesheet"/>
    <script src="/Scripts/modernizr-2.5.3.js"></script>
</head>
<body>   
<h2>Index</h2>
    <script src="/Scripts/jquery-1.9.0.js"></script>
    <script src="http://cdn.kendostatic.com/2012.3.1114/js/kendo.all.min.js" type="text/javascript"></script> 
</body>
</html>

When I view the page, I am receiving the following error in my javascript console:

Uncaught TypeError: Object function ( selector, context ) {
        // The jQuery object is actually just the init constructor 'enhanced'
        return new jQuery.fn.init( selector, context, rootjQuery );
    } has no method 'sub' 

kendo.all.min.js:10

Anyone else running into this issue? And what am I doing incorrect?

mattruma
  • 16,589
  • 32
  • 107
  • 171

1 Answers1

8

What jrummell said - we don't officially support jQuery 1.9.0 yet, as it was released on the same day as our service pack. jQuery 1.9.0 has a number of breaking changes since 1.8.x and if you need it to be API compatible with 1.8, please also include the jQuery Migrate plugin.

Update: Kendo UI Q1 2013 supports and ships with jQuery 1.9.1.

Bundyo
  • 2,195
  • 13
  • 13
  • That's not the answer I wanted to hear! :) So is KendoUI always going to be behind when it comes to newer versions of jQuery? – mattruma Jan 17 '13 at 16:23
  • By including `` ... I was able to get it to work. Thanks! – mattruma Jan 17 '13 at 16:25
  • 1
    Glad to hear the Migrate plugin did the trick. That's why the blog post recommends starting with it being included. The uncompressed version provides console warnings that should help identify what 1.9 didn't like. – Dave Methvin Jan 17 '13 at 16:55
  • @mattruma keep in mind that jQuery 1.9.0 was released the same day (as in, a few hours after) of the SP release. A bit tricky to test the release for something that wasn't out yet! You'll see official support for it with an upcoming release :) – carlbergenhem Jan 17 '13 at 22:35
  • 4
    @mattruma I think you have a very unrealistic set of expectations, no? Even jQuery projects UI and Mobile don't currently support jQuery 1.9. jQuery Mobile found breaking changes after 1.9 was released due to the fluctuations of the code right before release. It's unrealistic to expect a framework to be 100% reliable on updated dependencies the same day as the update is released. – RedWolves Jan 17 '13 at 22:40
  • 1
    @RedWolves Most of the time, point releases don't seem to cause "too much" trouble ... but you are correct regarding my expectations ... point taken ... thank you. – mattruma Jan 18 '13 at 01:57
  • 2
    On a side note the service pack release of Kendo UI addresses the "jQuery.sub" problem. There are other incompatibility issues with 1.9 though. The general practice of Kendo UI is to ship with a newer version of jQuery only on major releases. – Atanas Korchev Jan 18 '13 at 06:21
  • @AtanasKorchev Is there an open source release that contains the service pack fixes? – nickb Mar 01 '13 at 00:10
  • No, there isn't. Service packs and internal builds are currently available only in the commercial version. The next major release is expected in mid March and this includes the open source version. – Atanas Korchev Mar 01 '13 at 08:22
  • Interestingly I just set up a basic MVC app to check out Kendo UI, particularly the menu. I loaded kendo.menu, which is version 2012.3.1114. This package says it depends on jQuery 1.9.0 and therefore update jQuery. This of course fails with the problem listed above. Someone from Telerik might like to fix that! – Jon P Smith Apr 22 '13 at 10:13
  • 2012.3.1114 doesn't depend on 1.9.0, but on 1.8.x - as you can see above, the first Kendo UI version that works with 1.9.0 is Q1 2013 which has 2013.1.319 as a version number. Which package are you referring to? – Bundyo Apr 22 '13 at 13:24