JavaScript runtime error: '$' is undefined occurred RRS feed

  • Question

  • User2056817590 posted

     $('#masterHPPierBoxPierE .masterHPPierBox').click(function () {
            var URL = "@Url.RouteUrl("MasterVesselSch", new { value = "E" })";
            window.location.href = URL;
            @*window.location.href = "@Url.Content("~/Home/_SetPierSelectedFromMaster/?value=E")";*@

    Wednesday, May 26, 2021 5:02 AM

All replies

  • User1686398519 posted

    Hi kalvakrishna, 

    There are many reasons for this error, for example:

    1. the loading order of JavaScript assets is incorrect.
    2. Unable to load/find jQuery source.
    3. Conflicting plugin/library/code.

    I suggest you check your view code to see if the jquery file is referenced correctly.

    In addition, you can check Network by F12 in the browser to see if the jquery file is loaded correctly.

    Best Regards,


    Wednesday, May 26, 2021 7:24 AM