Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Axel 68 posts 96 karma points
    Aug 15, 2014 @ 09:27

    How load Jquery when not base path

    Hi, i have as custom Control where i load the jquery lib

    that works if i on the base path of the document. but when i go deper folder it won't be load my jquery lib.
    how can i get the curent base path in my custom control? 

    for example if i have the root path
    it works
    don't work
    Use Umbraco 7.1,Webforms


  • Tom 119 posts 447 karma points
    Aug 15, 2014 @ 10:07

    dont you have like a masterpage - couldn't you just load the js files on there?

  • Dan Lister 416 posts 1974 karma points c-trib
    Aug 15, 2014 @ 12:24
    Dan Lister

    Hi Axel,

    Sounds to me like you need to reference your jQuery library as an absolute path. Something like the following. Note the url starting with a forward slash.

    <script type="text/javascript" src="/scripts/jquery.min.js"></script>

    Thanks, Dan.

Please Sign in or register to post replies

Write your reply to: