We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23299
    • 1,161 Posts
    I can get your basic menu system to work using Wayfinder.

    I would to play around with adding some flourishes to the menu itself using javascript. I know next to nothing about writing javascript, but am OK with writing xhtml and CSS. I have looked at some of the jquery samples and tutorials and it seems somewhat straight forward: write good code and style the menu list with CSS, then add the correct links for the script in the head of the document and add the downloaded jquery script. I have played round with this and managed to change the CSS for different effects.

    My question is this: are there any land mines to watch out for when using this with MODx? Do I just add the script and CSS to my template folder? How do I go about making the Wayfinder snippet call to play nice with the jquery effect I want? I also have heard that jquery and Mootools can conflict at times. Not sure if this is the case here or not.

    Any thoughts, samples or links would be msot welcome!

    Max
      • 7231
      • 4,205 Posts
      Run jQuery in noConflict() mode: http://docs.jquery.com/Using_jQuery_with_Other_Libraries

      Jquery is mostly unobtrusive so you can easily add (in most cases) it to the wayfinder menu. My tip for using example menus: use them as examples then use yout Wayfinder experience to adapt it to work with wayfinders output, rather than bending the output to match the script.
        [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

        Something is happening here, but you don't know what it is.
        Do you, Mr. Jones? - [bob dylan]
        • 23299
        • 1,161 Posts
        Thanks Shane,

        I will take a look at that link...

        Hope things are gloing well.

        Cheers,

        Max
          • 20288
          • 132 Posts
          I’ve got a jQuery navigation menu on my portfolio site, http://www.damonbauer.com.

          I disabled QuickEdit, as it used MooTools, and conflicted with jQuery. I could have used noconflict, but I don’t use QuickEdit, so I didn’t need it.

          In my Wayfinder call, I used &jsTpl to hold the jQuery code. Not sure if you have to have the jsTpl, but it works just fine with it.
            • 23299
            • 1,161 Posts
            That looks pretty good.

            What is &jsTpl if I might ask?
              • 20288
              • 132 Posts
              Quote from: Photowebmax at Dec 08, 2008, 02:04 PM

              That looks pretty good.

              What is &jsTpl if I might ask?

              &jsTpl is a Wayfinder parameter that holds JS code for the menu. Like I said, I’m not sure if you have to have it, but my menu works with it.
                • 23299
                • 1,161 Posts
                Thank you Sir!