0
Welcome Guest! Login
0 items Join Now

Image Replacement on Hover

  • Image Replacement on Hover

    Posted 13 years 1 week ago
    • I've been trying to find a solution for this, but I'm stuck.
      Anyone out there with ideas, please share 'em!

      I'm trying to create a (simple?) image-replacement effect, when the user hovers over an image.
      ( see: http://www.chrismayther.com/ )

      In the past, I've used a little JavaScript to accomplish this, but now, I'm using Gantry, and don't want to alter the core too much, so I can easily upgrade.

      So, I'm looking into CSS, but what works in one browser isn't working in another.

      Any ideas out there, on the best way to perform a basic image-hover effect?
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Image Replacement on Hover

    Posted 13 years 1 week ago
    • Hi, Javascript and CSS are the best ways to do a image mouseover. If you put the scripting inline or keep your scripts in the template folder there is no need to alter the core files. You shouldn't need to modify any Gantry files to do this.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Image Replacement on Hover

    Posted 13 years 1 week ago
    • Ideal -- but how do I include JS inline? Even after changing the TinyMCE settings, any Javascript I include in the article will get stripped out.
  • Re: Image Replacement on Hover

    Posted 13 years 1 week ago
    • Perhaps some pointers on how best to include custom JS into Gantry would be helpful....

      Thanks, Cliff.

      Ben
  • Re: Image Replacement on Hover

    Posted 13 years 1 week ago
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Image Replacement on Hover

    Posted 13 years 1 week ago
    • You can use RokPad as your editor, or some other code editor. TinyMCE is not ideal for this type of thing. Plugins work too.
    • The difficult we do immediately, the impossible takes a little longer.
  • Re: Image Replacement on Hover

    Posted 13 years 2 hours ago
    • Hey, Cliff --

      I've been trying to follow up on what you shared -- that I could use RokPad as my editor.

      I love RT products, and if I can use one less extension, then using RokPad will be ideal for me;

      However, I can't get script tags to remain, when I save a mod_custom module.

      My sequence is this;
      1) Open a Custom HTML module
      2) In the textarea, paste some Twitter code:
      <a href="https://twitter.com/SOMEUSER" class="twitter-follow-button" data-button="grey" data-text-color="#FFFFFF" data-link-color="#00AEFF" data-show-count="false">Follow @SOMEUSER</a>
      <script src="//platform.twitter.com/widgets.js" type="text/javascript"></script>
      3) Save.

      When the page reloads after the Save event, the last line, with the SCRIPT tags, will have been removed.

      I've checked for a setting, and can't find anything.

      Can you help me understand what I'm missing?

      Thanks, Cliff.

      Ben
    • Cliff Pfeifer's Avatar
    • Cliff Pfeifer
    • Preeminent Rocketeer
    • Posts: 8444
    • Thanks: 20
    • Website Developer

    Re: Image Replacement on Hover

    Posted 12 years 11 months ago
    • prim's Avatar
    • prim
    • Preeminent Rocketeer
    • Posts: 17290
    • Thanks: 217

    Re: Image Replacement on Hover

    Posted 12 years 11 months ago
    • Have you also checked that Joomla itself is not stripping out code? It wouldn't be the first time this happens.
    • Please reply with a direct link to the issue & create a new thread for each new issue.

      A template is only as good as the content that goes into it ;) - DanG
  • Re: Image Replacement on Hover

    Posted 12 years 11 months ago
    • @prim -- What setting are you (perhaps) referring to?
      I agree, that Joomla! (itself) is likely the one stripping those tags out -- but how do I get it to stop?
      I'm not familiar with any J!-core settings for this.

      Any help is appreciated.

      Thanks, guys.

Time to create page: 0.054 seconds