jQuery library location wants to be referenced differently on server

后端 未结 4 1225
再見小時候
再見小時候 2020-12-18 10:32

I\'ve got an ASP.NET MVC application that uses jQuery. To load the js libraries, I reference them like this:



        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-18 11:08

    Have you tried referencing the file from the root url? I.e. instead of "../../", which has to crawl up a directoy, use "/Content/Scripts/jquery-1.3.2.min.js". This would angnostic of your directory structure.

    You should also consider using google to load jquery:

    http://code.google.com/apis/ajaxlibs/

    You'll get much better load times.

    Mike

提交回复
热议问题