We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    Quote from: cbaone at Jul 30, 2008, 08:26 AM

    Works as advertised! Thanks a million! I really appreciate your work on this. grin

    Glad to hear it solved your problem. Your comments really helped improve the snippet and your testing and feedback was invaluable. grin

    PS: You can see your name in the source code of the snippet. laugh
      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
      • 3749
      • 24,544 Posts
      Quote from: rasc at Feb 26, 2008, 02:18 AM

      What about links instead of spans for the questions? Now you can’t use keyboard to navigate the FAQ content. With navigation via tab key you’ll get better accessibility.

      Link targets should be written as anchors like "#faq01", "#faq02" and so on (needs an automatic counter in the snippet). Example for such a link-based "accordion menu" can be found in content of www.sybit.de/en/solutions/sap-crm/sap-crm-solutions.html (Sales, Marketing, ...)

      rasc,

      I didn’t forget about this comment -- I like the idea, but I just haven’t been able to get it to work with the dynamicDrive js used by the snippet. I spent quite a bit of time on it but it had serious conflicts with the .CSS., especially the open/close symbol which is generated by the js and mysteriously doesn’t even appear in the source of the page. I tried using the jQuery accordion menu from the site you mentioned, but it had similar problems and never did work for me in Firefox.

      I finally gave up but I may go back to it later.

      Thanks for the idea.
        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
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Of course it doesn’t appear in the source of the page. The source of the page is taken directly from the original HTML that is sent, and these are generated by javascript after the page is loaded. You can dig throught the DOM with Firebug and find everything on the page, including javascript-generated elements.
          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
          • 3749
          • 24,544 Posts
          Quote from: sottwell at Jul 30, 2008, 11:28 PM

          Of course it doesn’t appear in the source of the page. The source of the page is taken directly from the original HTML that is sent, and these are generated by javascript after the page is loaded. You can dig throught the DOM with Firebug and find everything on the page, including javascript-generated elements.

          Duh. I hope I don’t sound that dumb all the time. embarrassed

          I wish I knew more about styling those elements.
            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Sorry, I didn’t mean to come across like that! I was just trying to explain the flow of the logic leading to the javascript-generated tags.

            I haven’t actually used this snippet, so I can’t really get into more details on it, just on this kind of javascript-driven dynamic system in general. You’ll have to examine the code or use Firebug to determine just what elements are being created, and either edit the .css file in assets/snippets/ezfaq/ezfaq.css or use a separate .css file for this (use the &cssPath parameter in the snippet call to specify the path to your separate .css file, the snippet will add it to the document head automatically.)
              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
              • 12584
              • 208 Posts
              Great snippet and works really nice but I am having a few styling issues, is there an easy way to put a little more space between the questions, I started adding

              after each question but for some reason after Q:7 these spaces creted by the
              stop working and I can not work out why, I am editing the page with the RTE turned off,  here is the problem I have otherwise this is a great snippet.

              Thanks Ian

              ps just posted this and then checked it in I.E< and found things are not working to wel at all in that!!!!
                • 3749
                • 24,544 Posts
                I see what you mean, but I’m not sure what could be causing it.

                The first thing to try is to take out all the <p> and </p> tags. Use
                to separate paragraphs in a question or answer and change the padding or margin in the .CSS to get all other spacing.

                Are you using the newer version with the Extra: tag to place your anchors between the questions?

                Also, I see quickedit is on for the page so it’s possible may be a conflict there.

                I hope this helps. Let me know.
                  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
                  • 12584
                  • 208 Posts
                  Thanks for your tip on removing all the <p> I done that and this also solved another issue I was having with the spacing on the questions before they were expanded, things always seem obvious once you find the solution but I could not work that out earlier.

                  Thanks again
                    • 3749
                    • 24,544 Posts
                    Quote from: ian_m at Oct 07, 2008, 05:36 PM

                    Thanks for your tip on removing all the <p> I done that and this also solved another issue I was having with the spacing on the questions before they were expanded, things always seem obvious once you find the solution but I could not work that out earlier.

                    Thanks again

                    I’m glad it worked. BTW, I think your FAQ might look a little better if you styled the links with text-decoration:none so they wouldn’t be underlined.


                      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
                      • 12584
                      • 208 Posts
                      Yes I agree have changed the css and they are no longer underlined or at least not in I.E for some reason FF still shows the underline.

                      Thanks again for your help.

                      Cheers