Results 1 to 4 of 4

Thread: Is it possible to use an animated GIF in a rollover button with javascript?

  1. #1
    Join Date
    Jul 2010
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Is it possible to use an animated GIF in a rollover button with javascript?

    Hi, is it possible to use an animated GIF in a rollover button with javascript?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    There's nothing special about an animated gif-- it's just a gif, which is just a type of image. So, yes, you can use it in a rollover image exactly as you would do with any other image.

    The one problem might be that if it is a very large file, then it might take a while to load. But aside from that, it'll be like any other image.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. The Following User Says Thank You to djr33 For This Useful Post:

    Repatilian (12-05-2011)

  4. #3
    Join Date
    Oct 2006
    Location
    New York, NY, USA
    Posts
    262
    Thanks
    42
    Thanked 24 Times in 24 Posts

    Default animated GIF nut

    I'm an animated GIF nut (the poor man's Flash). See for instance Chanit at http://www.chanit.com/ -- where it starts off with a static version and then animates on rollover. And -- at http://www.auntnini.com/new/index.htm -- attached to text links are both omouseover for static JPEG and onclick for the animated GIF
    Code:
    <li><a href="#nogo" onmouseover="document.images['holder'].src='lighthouse.jpg'" onclick="document.images['holder'].src='lighthouse.gif'"> Lighthouse </a></li>
    You can set the number of animation loops in Photoshop so you don't drive people crazy with "forever"!

  5. The Following User Says Thank You to auntnini For This Useful Post:

    Repatilian (12-05-2011)

  6. #4
    Join Date
    Jul 2010
    Posts
    13
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •