We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 28042 ☆ A M B ☆
    • 24,524 Posts
    This little snippet creates a simple list menu from a given folder, having a link made up from the pagetitle of the documents and an <object> container with the content of the document. This is useful for fancy popup informational sections. See it in action here:

    http://www.jewishyou.com

    Move the mouse over the links in the upper left section.

    This method uses an interesting feature of XHTML, the <object> tag. <object> tags can appear inside of <a> tags, and can be used as a block-level container! So...the snippet encloses the content of the document in an <object> tag inside the <a> tag, so even IE can get the popup effect using the a:hover pseudoclass, and the <object> can be styled by the CSS!

      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
      • 25663 MODX Staff
      • 12,272 Posts
      Susan, very cool trick indeed... object in an A element laugh

      Might want to have a look at it in a nightly Safari build.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        Oh, pooh. Back to li:hover and javascript. <sigh> And I thought I was so smart!
          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
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          You know, putting the <p> element inside of the <a> element actually works, it just doesn’t validate.
            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
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            Hah! I can use a <span> inside the <a> tags! Works fine, Safari too. I knew I was smart!

            Updated version attached to first post.
              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