We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 11678
    • 160 Posts
    I’m pulling my hair out!
    I need to load 2 javascript libraries: jquery.cycle.all.min.js and jquery-1.3.2.min.js
    Both of these js libraries are located in: htdocs/assets/js/

    I tried;
    <script src="assets/js/jquery.cycle.all.min.js" type="text/javascript"></script>
    <script src="assets/js/ jquery-1.4.2.min.js" type="text/javascript"></script>

    with absolutely no effect.

    But if I load them from a CDS, they work perfectly.
    <!-- include jQuery library -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>

    <!-- include Cycle plugin -->
    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.2.74.js"></script>

    I have other js libs I want to load and can’t get them to load either and they are not available on a CDS or I would go that route.
    thanks for any help,
    HalD
      "Today’s headlines are nothing more than whispers of history"
      • 4310
      • 2,310 Posts
      In the <head> tag of your template do you have something like :
      <base href="http://your-domain.co.uk/" />
      
        • 11678
        • 160 Posts
        Not exactly - I have the modx version which should work;
        <base href="[(site_url)]" />

        I’ll try changing it to the other way to see if it makes any difference.
        Thanks for the tip.
        Hald
          "Today’s headlines are nothing more than whispers of history"
          • 4310
          • 2,310 Posts
          Sorry, what you have should work.
          What do you actually get in the html source code when you view a page?
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Actually that depends on the browser. Some versions of IE want it closed:
            <base href="[(site_url)]"></base>

            Have you tried using the whole URL in the script tag src attribute?
              Studying MODX in the desert - http://sottwell.com
              Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
              Join the Slack Community - http://modx.org
              • 11678
              • 160 Posts
              Thanks for the advice; I’ll try the whole url next.
                "Today’s headlines are nothing more than whispers of history"