I have tried including the 1.7.min file and turning off the built in version, but then none of the client side event work
Html.Telerik().ScriptRegistrar().jQuery(False)I register 1.7 first then:
@(Html.Telerik().ScriptRegistrar().jQuery(False).jQueryValidation(False).DefaultGroup(Function(group) group.Combined(true).Compress(true)))31 Answers, 1 is accepted
jQuery 1.7 has a breaking change (an expected behavior actually), which causes the described problem. We have notified the jQuery team about this.
We do not intend to ship our MVC comonents with jQuery 1.7. Instead, we will wait for a fix for the problem, which should be included in 1.7.1. Then we will upgrade and make the components compatible with the latest jQuery version.
All the best,
Dimo
the Telerik team
Well that's good news then, hope 1.7.1 comes out soon and fixes the problem - saw noticeable speed improvements from upgrading to 1.7 but obviously unusable until it's working as it should.
Blog about it here: http://blog.jquery.com/2011/11/17/jquery-1-7-1-rc1-released/
If anyone tries it to resolve this bug, could you please let us know your results?
Thanks,
Ryan.
Just tried 1.7.1 RC1 and still not working
If you want to use jQuery 1.7.1rc, you need to change the trigger() in telerik.common.js like this:
Old:
trigger: function (element, eventName, e) {
e = $.extend(e || {}, new $.Event(eventName));
e.stopPropagation();
$(element).trigger(e);
return e.isDefaultPrevented();
}
New:
trigger: function (element, eventName, e) {
e = $.extend(e || {}, new $.Event(eventName));
$(element).triggerHandler(e);
return e.isDefaultPrevented();
}
Regards,
the Telerik team
A minified file including the discussed fix will be available when we implement it and test it, and upload an internal build. Note that internal builds are available to licence holders only. Open source developers can modify the source and use any third-party minification tool available online.
Best wishes,
Dimo
the Telerik team
Do we know when there will be an updated scripts so we can use jquery 1.7.1?
I am afraid we do not have a precise date fo a service pack release. Usually we ship one a month or so after the major release, which was 10 days ago.
It is somewhat unlikely that we will provide an internal build with jQuery 1.7.1. because there is a risk of breaking working applications due to changes in the way events are triggered in jQuery.
All the best,
Dimo
the Telerik team
Thanks for this, is it possible to get the unminified version of the telerik.common.min.js so I can apply the fix mentioned above.
Thanks
The source code of our MVC components is provided in the downloadable MSI or ZIP distributions (excluding the "hotfix" packages). Look for a "Source" folder.
Best wishes,
Dimo
the Telerik team
But jQuery still mounted version 1.6.4.
We have not released a build with jQuery 1.7.1 yet.
Best wishes,
Dimo
the Telerik team
We will update our MVC extensions to use jQuery 1.7.1 for the next service pack in January. However, we have modified our source to be compatible with it, so if you donwload the latest internal build, you can upgrade the jQuery version.
Greetings,
Dimo
the Telerik team
Cheers
The internal builds are available for the commercial license only. They should be available under the MVC download page for people who purchased our MVC extensions. The same holds true for the official service pack releases of the suite.
Best regards,
Sebastian
the Telerik team
Files are attached. Hope this helps someone.
The next official release is due late February.
Kind regards,Atanas Korchev
the Telerik team
@(Html.Telerik().ScriptRegistrar() .jQuery(false) .jQueryValidation(false) .Globalization(true) .DefaultGroup(g => g .Add("jquery-1.7.1.min.js") .Add("jquery-ui-1.8.17.min.js") .Add("jquery.cookie.js") ) )
Now, in one of my views, I am trying to use the Grid, however when the page runs, I get a FileNotFoundException, stating that the ScriptRegistrar (in the layout view) could not find the "specified" jquery 1.6.4.js file. Can anyone tell me what I might be doing wrong here?
I also need to use Telerik MVC extensions with jQuery 1.7 and come into problems.
I see you wrote that should replace some code in telerik.common.js file.
Can you explain me how I can modify this file?
I tried download telerik.common.js file and put it under Scripts folder instead of the telerik.common.min.js file
but nothind works for me.
How can I using the full fule instead of the min file?
Thanks,
Yocheved
You need to update the file reference tag. Typically located in your shared _Layout.cshtml file if you're using Razor. Something like this:
<script src='@Url.Content("~/Scripts/jquery-1.7.2.min.js")' type="text/javascript"></script>and disable built in jquery usage by telerik like this:
@(Html.Telerik().ScriptRegistrar()
.jQuery(false))
Tank you for your replay, but I already tried do it, but if I disable the telerik jquery usage, an exception was thrown for each telerik js files. The exception message is: "Microsoft JScript runtime error: Object doesn't support this property or method"
I got the exception only for the home page. I don't get the exception for another page that using telerik component or/and other jquery ui.
Here is my _Layout file:
@
using Telerik.Web.Mvc.UI;
@
using Telerik.Web.Mvc;
@{
//resources
Html.AppendScriptParts(@Url.Content(
"~/Scripts/public.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery.validate.unobtrusive.min.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery.validate.min.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery.unobtrusive-ajax.min.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery-1.7.1.min.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery.jcarousel.pack.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery-1.1.2.pack.js"));
Html.AppendScriptParts(@Url.Content(
"~/Scripts/jquery-1.7.2.min.js"));
Html.EnableClientValidation(
true);
Html.EnableUnobtrusiveJavaScript(
true);
Html.ValidationSummary(
true);
}
<!
DOCTYPE html>
<
html @Html.Partial("LanguageAttributes")>
<
head>
<title>@Html.Title(true)</title>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<meta name="description" content="@(Html.MetaDescription())" />
<meta name="keywords" content="@(Html.MetaKeywords())" />
Html.Partial("Head")
@Html.Action(
"RssHeaderLink", "News")
@Html.Action(
"RssHeaderLink", "Blog")
@Html.Action(
"Favicon", "Common")
@
if (displayMiniProfiler)
{
@MvcMiniProfiler.
MiniProfiler.RenderIncludes();
}
</
head>
<
body>
<div class="master-wrapper-page">
<div class="master-wrapper-content">
@Html.Partial(
"_Notifications")
@Html.Partial(
"Header")
@Html.Partial(
"HeaderMenu")
@RenderBody()
<div class="clear">
</div>
</div>
@Html.Action(
"Footer", "Common")
</div>
</
body>
@(Html.Telerik().StyleSheetRegistrar()
.DefaultGroup(group => group
.Add(
"newTelerikCommonStyle.css")
.Add(
"newTelerikTelerikStyle.css")
.Add(
"newTelerikRtlStyle.css")
.Add(
"telerik.examples.min.css")
))
@(Html.Telerik().ScriptRegistrar()
.jQuery(
false)
// .jQueryValidation(false)
)
</
html>
Thanks,
Yocheved
Tank you for your replay, but I already tried do it, but if I disable the telerik jquery usage, an exception was thrown for each telerik js files. The exception message is: "Microsoft JScript runtime error: Object doesn't support this property or method"
I got the exception only for the home page. I don't get the exception for another page that using telerik component or/and other jquery ui.
Here is my _Layout file:
@using Telerik.Web.Mvc.UI; @using Telerik.Web.Mvc; @{ //resources Html.AppendScriptParts(@Url.Content("~/Scripts/public.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.validate.min.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.unobtrusive-ajax.min.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery-1.7.1.min.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery.jcarousel.pack.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery-1.1.2.pack.js")); Html.AppendScriptParts(@Url.Content("~/Scripts/jquery-1.7.2.min.js")); Html.EnableClientValidation(true); Html.EnableUnobtrusiveJavaScript(true); Html.ValidationSummary(true); } <!DOCTYPE html> <html @Html.Partial("LanguageAttributes")> <head> <title>@Html.Title(true)</title> <meta http-equiv="Content-type" content="text/html;charset=UTF-8" /> <meta name="description" content="@(Html.MetaDescription())" /> <meta name="keywords" content="@(Html.MetaKeywords())" /> @Html.Partial("Head") @Html.Action("RssHeaderLink", "News") @Html.Action("RssHeaderLink", "Blog") @Html.Action("Favicon", "Common") @if (displayMiniProfiler) { @MvcMiniProfiler.MiniProfiler.RenderIncludes(); } </head> <body> <div class="master-wrapper-page"> <div class="master-wrapper-content"> @Html.Partial("_Notifications") @Html.Partial("Header") @Html.Partial("HeaderMenu") @RenderBody() <div class="clear"> </div> </div> @Html.Action("Footer", "Common") </div> </body> @(Html.Telerik().StyleSheetRegistrar() .DefaultGroup(group => group .Add("newTelerikCommonStyle.css") .Add("newTelerikTelerikStyle.css") .Add("newTelerikRtlStyle.css") .Add("telerik.examples.min.css") )) @(Html.Telerik().ScriptRegistrar() .jQuery(false) // .jQueryValidation(false) ) </html>
Thanks,
Yocheved
If you're including jQuery separately, use a CDN:
<script src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js" type="text/javascript"></script>I try remove the two duplicate scripts but it still failed.
When I disable the jquery by Html.Telerik().ScriptRegistrar().jQuery(false) it is failed on 'Object doesn't support...." in each telerik js file (common, calendar etc').
When I don't disable the jquery, it is not failed in Home page, but it is failed in a page that using another jQuery component (
jcarousellite_1.0.1.js)
What can be the reason?
Thanks,
Yocheved
We had a similar problem that seemed to be an order of operations issue. What was worse was that sometimes the client would load jquery in time and everything would work great.
The work around we did was disable jquery in the scriptmanager and added
<script type="text/javascript" src="@Url.Content("~/Scripts/2012.2.607/jquery-1.7.1.min.js")"></script>to the head section of _Layout.cshtml. This forced the client to load jquery first before any of the javascript loaded by the script registrar. Not ideal, but couldn't get around the random jquery failures any other way.
