Search code examples
f#resourcesofflinewebsharper

Redefine jQuery dependency search path


I have found that a typical Websharper "hello world" application does not work offline due to the inaccessibility of jQuery resource "http://code.jquery.com/jquery-1.11.2.min.js". The question is: can I override this search path to the local folder of my web application?


Solution

  • Download jquery-1.11.2.min.js and place it in Scripts. Then add this to your Web.config as child of the root tag configuration:

    <appSettings>
      <add key="WebSharper.JQuery.Resources.JQuery" value="/Scripts/jquery-1.11.2.min.js" />
    </appSettings>
    

    If you want to do similarly with jquery-ui, this question helps.