JavaScript/jQuery - “$ is not defined- $function()” error

后端 未结 8 2048
轻奢々
轻奢々 2020-11-30 08:15

I am trying to run a JavaScript/jQuery function and Firebug gets the error:

$ is not defined $(function()\".

The JavaScript code is placed

8条回答
  •  生来不讨喜
    2020-11-30 09:06

    Im using Asp.Net Core 2.2 with MVC and Razor cshtml My JQuery is referenced in a layout page I needed to add the following to my view.cshtml:

    @section Scripts {
    $script-here
    }
    

提交回复
热议问题