Telerik and jquery
Asked Answered
P

5

16

I'm working on an application I received from a client and they've used some telerik web controls. Telerik apparently includes its own version of jquery 1.3.2, while I'm using 1.4.1. I'm experiencing some weird javascript issues and I'd like to rule out the older jquery as a source of the problem. Is there a way to tell the Telerik controls not to automatically include the 1.3.2 version of jquery if I've already got jquery on the page elsewhere?

Padlock answered 22/2, 2010 at 22:17 Comment(0)
C
13

Try jQuery.noConflict(). Using jQuery with Other Libraries

Cauthen answered 22/2, 2010 at 22:19 Comment(2)
Haha I knew about that for including other libraries, but didn't even think about it for multiple jquery versions. Thanks!Padlock
RadControls for ASP.NET AJAX Q1 2011 are now using jQuery version 1.5.1 telerik.com/help/aspnet-ajax/introduction-using-jquery.htmlFavorite
C
4

I'm not sure whether the approach shown by andreas will help you. As you can read in this article (or here), telerik already does something similar "to avoid compatibility issues with applications which already use (other versions of) jQuery".

Coldshoulder answered 22/2, 2010 at 22:51 Comment(0)
Q
4

I did it by telling Telerik not to register his version of jQuery at all It can be done once for the site in _Layout.cshtml file

in head section I am loading needed versions of jQuery scripts manually

<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>

then before

    @(Html.Telerik().ScriptRegistrar().DefaultGroup(
    group => group.Compress(false).Combined(false))
    .jQuery(false)
    .jQueryValidation(false))
Quoth answered 22/4, 2012 at 11:18 Comment(0)
O
2

I think the latest version of Telerik controls use jQuery 1.4.1 now.

Ortrud answered 23/2, 2010 at 15:37 Comment(1)
I searched telerik to find out what version of jquery they are using, I found this site that says they use 1.4.2: telerikwatch.com/2010/03/q1-2010-is-live.htmlPetit
R
0

Are you importing Jquery as a CDN or locally ? So for the first case you can go to View/Shared/Layout.cshtml and add the script tags before the head section . For example : I'm using the latest version of Jquery :

 <script src="https://kendo.cdn.telerik.com/2021.2.511/js/jquery.min.js"></script>

For the second case , you can download the Jquery from the official website and import it locally in wwwroot/lib/jquery

Rosendorosene answered 15/6, 2021 at 16:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.