This is a migrated thread and some comments may be shown as answers.

[Solved] jQuery 1.7

31 Answers 664 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sam
Top achievements
Rank 2
Sam asked on 11 Nov 2011, 06:45 PM
How can I upgrade to jQuery 1.7 and still use the MVC Extensions?

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

Sort by
0
Adel Khalil
Top achievements
Rank 1
answered on 12 Nov 2011, 02:21 PM
have the same issue as well.
0
Dimo
Telerik team
answered on 14 Nov 2011, 08:19 AM
Hello,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 15 Nov 2011, 04:41 PM
Edit: Didn't see Dimo's reply... need more coffee.

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.
0
Ryan
Top achievements
Rank 1
answered on 21 Nov 2011, 09:31 AM
There's a release candidate for JQuery 1.7.1 that was released on the 17th November 2011.

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.
0
Chris Foster
Top achievements
Rank 1
answered on 21 Nov 2011, 10:34 PM
@Ryan

Just tried 1.7.1 RC1 and still not working
0
Alex Gyoshev
Telerik team
answered on 22 Nov 2011, 08:22 AM
Hello all,

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,

Alex Gyoshev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 22 Nov 2011, 04:39 PM
What do you use to minify the rest of the .js files in general or can you give us a fixed file that's minified like the rest? Looks like 1.7.1 final is out.
0
Dimo
Telerik team
answered on 22 Nov 2011, 05:09 PM
Hi Vesselin,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Duncan
Top achievements
Rank 1
answered on 25 Nov 2011, 11:06 AM
Hi

Do we know when there will be an updated scripts so we can use jquery 1.7.1?
0
Dimo
Telerik team
answered on 25 Nov 2011, 01:33 PM
Hi Duncan,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Duncan
Top achievements
Rank 1
answered on 25 Nov 2011, 03:15 PM
Hi

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
0
Dimo
Telerik team
answered on 25 Nov 2011, 03:21 PM
Hello Duncan,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Ki Won
Top achievements
Rank 1
answered on 29 Nov 2011, 07:05 AM
Thank you Dimo.
Today I got new released product  download.
But jQuery still mounted version 1.6.4.
Do you use jQuery 1.7.1 version of the "Menu" control is not working with xml on the turning ...
0
Dimo
Telerik team
answered on 29 Nov 2011, 08:26 AM
Hi Ki Won,

We have not released a build with jQuery 1.7.1 yet.

Best wishes,
Dimo
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Caleb Sandfort
Top achievements
Rank 1
answered on 17 Dec 2011, 12:48 AM
Any update or ETA?
0
Dimo
Telerik team
answered on 19 Dec 2011, 09:17 AM
Hi all,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Rickard Nilsson
Top achievements
Rank 1
answered on 20 Dec 2011, 01:12 PM
How do I download the latest internal build?

Cheers
0
Sebastian
Telerik team
answered on 20 Dec 2011, 01:19 PM
Hi Rickard,

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
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Rickard Nilsson
Top achievements
Rank 1
answered on 20 Dec 2011, 01:23 PM
Awesome, thanks!
0
Alex
Top achievements
Rank 1
answered on 25 Jan 2012, 05:57 PM
I've modified the files, and quickly tested for them to work.  Minification was done through an online service. No guarantees. 
Files are attached.  Hope this helps someone.
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 25 Jan 2012, 06:16 PM
The latest internal build (2011.3.1306 is what I'm currently using) works well with jQuery 1.7.1 (at least I didn't run into any errors I was getting). Not sure when the first public (OS) release for this year would be though (March?)
0
Atanas Korchev
Telerik team
answered on 26 Jan 2012, 08:35 AM
Hi,

 The next official release is due late February.

Kind regards,
Atanas Korchev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Lynn
Top achievements
Rank 1
answered on 13 Feb 2012, 09:16 AM
I am using the MVC extension version 2011.3.1306, and use jquery 1.7.1 (added via nuget) in my MVC3 project, and have the following razor snippet at the very bottom of my _Layout.cshtml file to try and tell the registrar not to load the baked in jquery 1.6.4, since I will use my own.
@(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?
0
Yocheved
Top achievements
Rank 1
answered on 15 May 2012, 10:57 AM
Hello,
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
0
Alex
Top achievements
Rank 1
answered on 15 May 2012, 02:33 PM
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))
0
Yocheved
Top achievements
Rank 1
answered on 15 May 2012, 03:05 PM
Hello,
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

 

0
Yocheved
Top achievements
Rank 1
answered on 15 May 2012, 03:11 PM
Hello,
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

 

0
Alex
Top achievements
Rank 1
answered on 15 May 2012, 03:15 PM
you are including jquery twice.  1.7.1 and 1.7.2.  Remove one of them.
0
Vesselin Obreshkov
Top achievements
Rank 2
answered on 15 May 2012, 04:00 PM
No two but seems like you got 3 different versions of jQuery unless this "jquery-1.1.2.pack.js " is some plugin that should probably use a different name. The rest of your codes look fine. However, you can save yourself even more coding and replace the jquery.min.js in your Telerik MVC Extensions folder with whatever jQuery version you want to use and then you won't have to do anything, the ScriptRegistrar will simply include your custom jquery.min.js from the ~/Scripts/2012.1.XXXX folder.

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>


0
Yocheved
Top achievements
Rank 1
answered on 15 May 2012, 09:31 PM
Hello,
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

0
Dan
Top achievements
Rank 2
answered on 27 Aug 2012, 05:58 PM
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.                                 
Tags
General Discussions
Asked by
Sam
Top achievements
Rank 2
Answers by
Adel Khalil
Top achievements
Rank 1
Dimo
Telerik team
Vesselin Obreshkov
Top achievements
Rank 2
Ryan
Top achievements
Rank 1
Chris Foster
Top achievements
Rank 1
Alex Gyoshev
Telerik team
Duncan
Top achievements
Rank 1
Ki Won
Top achievements
Rank 1
Caleb Sandfort
Top achievements
Rank 1
Rickard Nilsson
Top achievements
Rank 1
Sebastian
Telerik team
Alex
Top achievements
Rank 1
Atanas Korchev
Telerik team
Lynn
Top achievements
Rank 1
Yocheved
Top achievements
Rank 1
Dan
Top achievements
Rank 2
Share this question
or