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

Build 2013.1.319 Introduces js issue

6 Answers 114 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.
Rene
Top achievements
Rank 1
Rene asked on 21 Mar 2013, 12:20 PM
After just downloading and upgrading to build 2013.1.319 - I now receive the following error when starting my app:

Microsoft JScript runtime error: Object doesn't support property or method 'live'

The error occurs in jQuery.unobtrusive-ajax.js (Asp.net mvc):

$("a[data-ajax=true]").live("click", function (evt) {
        evt.preventDefault();
        asyncRequest(this, {
            url: this.href,
            type: "GET",
            data: []
        });
    });

p.s. I am using the jquery.min.js that comes with the latest Kendo build.

Please advise. 

6 Answers, 1 is accepted

Sort by
0
Rene
Top achievements
Rank 1
answered on 21 Mar 2013, 12:30 PM
the .live is only used 4 places in that jQuery.unobtrusive-ajax.js and does not appear elsewhere.

I just read the error is due to .live being deprecated in the latest jQuery and that it suggests replacing .live with .on

0
Rene
Top achievements
Rank 1
answered on 21 Mar 2013, 12:32 PM
http://stackoverflow.com/questions/14357416/asp-net-mvc-4-jquery-validation-script-bundle-not-working
0
Rene
Top achievements
Rank 1
answered on 21 Mar 2013, 12:56 PM
Solved by:

a) using nuget and installing jquery-migrate

b) including the migrate js in the following bundles (BundleConfig.cs):

bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
                  "~/Scripts/jquery-1.*",
                  "~/Scripts/jquery-migrate-1.*"));

bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
                  "~/Scripts/jquery.unobtrusive*",
                  "~/Scripts/jquery-migrate-1.*",
                  "~/Scripts/jquery.validate*"));

Then clean and rebuild the project.
0
Landon
Top achievements
Rank 2
answered on 28 Mar 2013, 07:57 PM
Thank you for posting the Fix for this issue, Rene. I had the identical issue.

Landon
0
Poh Joon
Top achievements
Rank 1
answered on 29 Mar 2013, 03:09 AM
Hi, update your js to the latest version 2.0.30116.0 should solve your issue if you are using jQuery 1.9.x. This can be done via nuget or install ASP.NET and Web Tools 2012.2 Update.
0
Bradley Fulton
Top achievements
Rank 1
answered on 25 Jul 2013, 06:15 PM
Upgrading to jQuery 2.0.3 also fixed similar issues with 716
Tags
General Discussions
Asked by
Rene
Top achievements
Rank 1
Answers by
Rene
Top achievements
Rank 1
Landon
Top achievements
Rank 2
Poh Joon
Top achievements
Rank 1
Bradley Fulton
Top achievements
Rank 1
Share this question
or