We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22770
    • 285 Posts
    Quote from: overhaulmedia at Feb 02, 2009, 11:42 AM

    This is way to complex for what I need.. sad

    grin Yeah. I was looking for a pure CSS solution. Doing it with javascript is certainly simpler (although my way is pretty easy once it’s set up). I’m not a fan of inline JS, and was going for maximum accessibility.
      • 33372
      • 1,611 Posts
      CSS works for things like this as well, but I don’t usually use CSS for rollovers when there’s a potentially unlimited number of images to swap out. You could, but it would mean that you’d probably want to add CSS code to the head dynamically to set your swap classes to the images on that particular page (since you wouldn’t want to have to add them all to your stylesheet). The other disadvantage to most CSS techniques is that they generally use background images, which don’t show up by default when printed from most browsers (we once had complaints about this that forced us to rewrite the entire script).

      CSS is perfect for navigational rollovers and other elements that don’t change from page-to-page, however.

      @overhaulmedia: If you’re still offering that reward, why don’t you make it a donation to the MODx project instead:
      http://modxcms.com/donate.html

      No pressure, of course...
        "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
        • 22457
        • 32 Posts
        For sure, just donated..

        Thanks for all the help, I’ll continue this thread as my solutions develop.

          • 22770
          • 285 Posts
          Quote from: ZAP at Feb 02, 2009, 01:31 PM

          CSS works for things like this as well, but I don’t usually use CSS for rollovers when there’s a potentially unlimited number of images to swap out. You could, but it would mean that you’d probably want to add CSS code to the head dynamically to set your swap classes to the images on that particular page (since you wouldn’t want to have to add them all to your stylesheet).
          True. I only have 4 galleries on the site, and the images change at most once a year, so it wasn’t an issue for me. For standard image galleries, I just user MaxiGallery.
          Quote from: ZAP at Feb 02, 2009, 01:31 PM

          The other disadvantage to most CSS techniques is that they generally use background images, which don’t show up by default when printed from most browsers (we once had complaints about this that forced us to rewrite the entire script).
          I must admit I wouldn’t want all the images to print, as they are only for decoration in this case. But, in fact, the images would print in my example unless disabled in the print stylesheet.
            • 33372
            • 1,611 Posts
            Quote from: PatrickSamphire at Feb 02, 2009, 01:47 PM

            I must admit I wouldn’t want all the images to print, as they are only for decoration in this case. But, in fact, the images would print in my example unless disabled in the print stylesheet.
            Most browsers are configured by default not to print background images, so the user would generally need to change that configuration to print them (which isn’t really a big deal, but you know how sometimes a minor detail can become a sticking point with clients).
              "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