We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26425
    • 15 Posts
    first things first - i am a noob, but am now on my third website built using modX. i have to say i love it - it is powerful, but it’s also friendly to the basic CSS hacking crowd.

    here’s the situation. i’ve got a butt-simple installation going using 0.962, except for the fact that i’m using a custom scrollbar called jsScrollPane, built in jQuery. i’ve done some research and jQuery appears to not play nice with ModX due to QuickEdit using Mootools. because of this warning i read, i removed Quickedit from the modules and renamed the module directory to avoid the include PHP errors when loading.

    so now the page loads fine but the custom scrollbar is nowhere to be seen. if i use the website as a static HTML install calling javascripts, it loads and works fine. but not in modX.

    so, questions i’m asking:

    is there a special permission that scripts need to run in ModX? they’re all currently at 644.

    is there an issue w/ jQuery and ModX beyond that of QuickEdit/Mootools issue. like a special configuration to make it work w/ modX?

    is there something else needing to be done to remove QuickEdit?

    can javascripts be run from directories other than /assets/js. i assume that they should be able to...


    if Mootools is a better choice - is there a scrollbar with CSS that is resizable when the div size or line height (font size) changes. i’m not looking for the IE method of the colored scrollbar - i want something cross-platform.

    thanks in advance,

    scott

    Apache 2.2.9
    PHP 5.2.6
    MySQL 5.0.45
    ModX 0.962
      • 33372
      • 1,611 Posts
      Can you post a URL? There’s definitely no reason that you can’t use any jQuery script that you like with MODx. The only time that you need to do anything special is when you’re also loading a mootools script on the same page (which isn’t a particularly good idea anyway, since that means loading two JS libraries). In that case you can use jQuery in compatibility mode, which just changes the way that you refer to jQuery variables.

      Aside from QuickEdit (which only loads when you’re logged into the Manager, so it’s not a problem that the public would see), the only other conflict that I know about with standard MODx scripts is if you use the ajax autocomplete features in AjaxSearch.

      I use jQuery for pretty much everything, and I’ve never had any particular problems related to MODx so I’d just check for normal script errors (such as an incorrect include path).
        "Things are not what they appear to be; nor are they otherwise." - Buddha

        "Well, gee, Buddha - that wasn't very helpful..." - ZAP

        Useful MODx links: documentation | wiki | forum guidelines | bugs & requests | info you should include with your post | commercial support options
        • 26425
        • 15 Posts
        URL is http://www.studio1510.com/modx

        yep, i figure path is a likely culprit, but i was pretty sure i checked it. let me see...

        allright - path is indicated as ’assets/templates/studiosite/scripts/(filename)’. i’ve got four calls to various script files in the index.html file under that template, plus one to the css file. all paths appear to be in order. no love - no change. i still get the ordinary scrollbar after flushing cache.

        hmm...the css file for the scrollbar (jscrollpane.css) isn’t in the same directory as the scripts themselves, but it doesn’t seem to refer to any existing files
        or paths, and the path specified in the index.html (assets/templates/studiosite) file appears to be fine.

        the mystery continues...i kinda feel this one should be pretty basic but i’m just not seeing it.

        scott

          • 4310
          • 2,310 Posts
          http://www.studio1510.com/modx/assets/js/jquery-1.2.3.min.js
          http://www.studio1510.com/modx/assets/js/jquery.em.js
          http://www.studio1510.com/modx/assets/js/jquery.dimensions.min.js
          http://www.studio1510.com/modx/assets/js/jScrollPane.js
          

          All report 404 Not Found error!
          Could help explain it wink
            • 26425
            • 15 Posts
            that’s interesting- my index.html doesn’t have the files at the assets/js path.

            oh right, duh - i get it - i always get confused about this. editing the index.html file in the template directory via FTP isn’t actually like editing the default template is it? i have to edit it in the Manager. i forget about this.

            bingo - works fine now after putting the js files where the ACTUAL index template file wanted to see them. have to say that is one of the non-intuitive things about template editing. i can edit the CSS file in the default template using TextWrangler, but the index file always seems to be a bit more hidden. i keep editing the index.html file in the template folder thinking that should work, but it’s not the file that is used as a default template, it seems.

            anyway thanks for the help. good tracking skills to practice in the future....

            scott
              • 4310
              • 2,310 Posts
              Templates, by default, are not physical files but entries in the DB, so are edited via the Manager.
              It’s a concept that catches a few people out, but usually only once grin
                • 36416
                • 589 Posts
                Quote from: scottl-modx at Nov 07, 2008, 04:39 AM

                that’s interesting- my index.html doesn’t have the files at the assets/js path.

                You also forgot to set <base...> path in your template, lack of it could trip some JavaScript libraries...
                  • 20288
                  • 132 Posts
                  Also, I have a jQuery navigation menu. The animation didn’t work, couldn’t figure out why. Then I disabled the Quickedit Toolbar Module and Plugin - reason being is because it uses MooTools and the 2 JS frameworks don’t play nicely together.

                  If you don’t use QE, and you haven’t fixed your problem, try that.

                  Moto