We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19872
    • 1,078 Posts
    I can't tell if it's how I'm calling the min.js or not. I have a min.js file that is not loading when the page loads. I found a site that will un minify (http://jsbeautifier.org/) and created an uncrompressed version and changed the name in the template, and it's still not loading.

    Basically, I am trying to get Orbit of Foundation 3 to work. At the moment, it just displays all 3 of my sample image in a column.

    I'll double check my code. Maybe my path is off or something cause it's the only thing that is not loading. Maybe it needs to be in the head? Although, the sample HTML doc that came with foundation has it at the end of the doc, just before a script to call up Orbit.

    Has anyone else worked with this? [ed. note: mmcgee last edited this post 13 years, 8 months ago.]
      • 3749
      • 24,544 Posts
      Minified files should work fine as long as there's not a bug in the JS code or the minifier screws it up.

      If you do a "view source" on the page, you should be able to click on the link to the JS file and view it (depending on what browser you use). That will tell you if the path is correct.
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 19872
        • 1,078 Posts
        Quote from: BobRay at Jan 12, 2013, 05:07 PM
        Minified files should work fine as long as there's not a bug in the JS code or the minifier screws it up.

        If you do a "view source" on the page, you should be able to click on the link to the JS file and view it (depending on what browser you use). That will tell you if the path is correct.

        Hi Bob:

        Thanks for responding. It's really strange. There are 3 js files that came already inserted down before the closing body tag. According to my activity window in Safari, those 3 were not downloading.
        I just moved them up to the Head area, and now they are at least downloading, but the orbit slider is still just plopping the images out on the page rather than placing them into a slider.

        I can't really click in view source, but I can copy the path "/assets/components/js/foundation.min.js" and get the page to load.
        I did check the errors in MODx, and it only showed a couple of errors from earlier when my paths to a couple of other image were indeed wrong.

        I think the js files are ok, because when I first was reviewing Foundation 3, I uploaded the files straight to my server and ran the traditional html page, and all of the js stuff worked OK.

          • 3749
          • 24,544 Posts
          You could try Firebug with Firefox. It should report any JS errors.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 19872
            • 1,078 Posts
            Quote from: BobRay at Jan 12, 2013, 05:17 PM
            You could try Firebug with Firefox. It should report any JS errors.


            Will do now. Thanks.
              • 19872
              • 1,078 Posts
              I opened with Firebug as well as the developer tool and didn't see or couldn't find any errors. Made sure to click on "Show errors" and reloaded the page.
              This is driving me crazy.
                • 19872
                • 1,078 Posts
                Hey Bob:

                You know when it's a good time to call it a day... Maybe just vedge in front of the TV and think about nothing?

                When you discover that you've been struggling most of the afternoon fixing code in a footer called "fnd-footer", only to realize that the call in the template is for "footer" Everything works now.

                Just give me 50 lashes with a wet noodle!

                Thanks for your feedback.
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Better to put a nice marinara sauce on the noodle and eat it. You're probably not only tired, but have low blood sugar. That makes a good excuse, anyway wink
                    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
                    • 10208 ☆ A M B ☆
                    • 1,780 Posts
                    The js should load in the footer, not in the head. You want the page to render fully before you begin loading the js. Trust me, it'll be much faster if you leave it in the footer.

                    You can also comment out the min.js and uncomment all the js files, load them individually. That way you can decide which you're going to use, and when done developing minify just the js files you use.

                    Control the settings for Orbit slider in app.js.
                      Frogabog- MODX Websites in Portland Oregon
                      "Do yourself a favor and get a copy of "MODX - The Official Guide" by Bob Ray. Read it.
                      Having server issues? These guys have MODX Hosting perfected - SkyToaster
                      • 19872
                      • 1,078 Posts
                      Now that I know I have the correct footer called out in my template, I'll definitely move the js back to the bottom. And I would probably go with a bolognese or a vodka cream sauce with the noodles:)

                      When you say "control the settings for the Orbit slider in the app.js, is that better than controlling it in the script down by the closing body tag? I guess maybe yes, because the app.js loads a set of defaults, and then the script on the page alters them. Better to have them just load to my liking to begin with.

                      Today I am troubleshooting why the orbit navigation arrows disappear when the width of the screen narrows to ipad or iphone width. Guessing there is a style I need to modify in one of the media queries. I did load their custom CSS for having the arrows only appear on hover.

                      Thanks for your feedback. All is greatly appreciated.