We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8463
    • 11 Posts
    Hello all,

    I am trying to include Snook’s Background transition script (http://snook.ca/archives/javascript/jquery-bg-image-animations/) into my site (http://zenith.revolutionary-designs.co.uk).

    I have included the relevant jQuery files and JS files, and also have tried the jQuery.noConflict() to fix the problem, but I cant seem to get the menu to slide/move. I have also tried making snippets and placing them into my template, but still no joy.

    I thought the problem was originally just bad JS file links, but they are all present and accounted for and am finally out of ideas!

    I have tried the whole page offline not on ModX - and it works, so I think i dont understand how ModX loads jQuery or something?

    Any help would be great!

    Thanks in advance!
      • 36493
      • 64 Posts
      Pretty sure nothing to do with modx.

      I think you are making your call before the dom has been fully loaded

      try wrapping your code in:
      $(document).ready(function() {

      //code

      });

      cheers,
        |
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It’s most likely a conflict with the QuickManager. If you’re going to have this header on all pages, go to the QuickManger plugin’s configuration tab and disable loading of JQuery in the front-end and loading it in no-conflict mode in the front end (or disable the plugin altogether if you’re not going to use it). Then use your jQuery in normal mode as you did on the offline page. If it’s only on the home page, you can disable QuickManager for individual pages, so disable it for resource ID #1 (if that’s your home page).
          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
          • 8463
          • 11 Posts
          Hello,

          Thanks for your help folks, but still nothing.

          I disabled the manager plugin in, but it still doesn’t activate my js script.

          I’ve change the code as you said no, but nothing happened there either..
            • 17499 ☆ A M B ☆
            • 872 Posts
            What error can you see in your javascript debug console ?
              • 36404
              • 307 Posts
              hi,

              funny, wondering the same thing as lossendae, i went to you website and no js error in firebug, then, why doesn’t that work ? -> web developer -> see javascript ! well, for the moment just because the script isn’t in your page smiley

              Have swing
                réfléchir avant d'agir
                • 17499 ☆ A M B ☆
                • 872 Posts
                I’ve checked the link you gave us as well.

                On the network tab of firebug there no JS loaded (no error, just not present) and one CSS who return a 404 error (style2.css).

                You might have forget to load the chunk in your template?
                  • 8463
                  • 11 Posts
                  Oh got rid of that style2.css, and ive loaded the chunk again, but still nothing.

                  It couldnt be because im working off a subdomain? Even though ive got the <base href="http://zenith.revolutionary-designs.co.uk" /> included?
                    • 8463
                    • 11 Posts
                    Ah ha!

                    Found the problem, when i added the no conflict, I missed a $ to add an ’s’ too.

                    Sorry for the bother and thanks for the help!