Subscribe Tuesday, January 6, 2009
Nov
09

Prototype Marquee

Post Categories: DevelopmentJavascriptPrototype |Posted on November 9th, 2008

While developing a website for a client, I was tasked with creating text that would fade in and out continuously. I figured that use case would be useful for many websites so I decided to create a class. It turns out the class is useful for cases where any html content has to be shown and hidden. The class is called Marquee.

I wrote several methods for controlling the Marquee class. Although I didn’t implement them for my current use case, I though they would be useful in the future. Methods included are

  • load
  • append
  • start
  • stop
  • clear
  • empty
  • next
  • previous
The class also accepts various options for configuring the Marquee and its messages. Last, I thought it would useful to monitor the different states of the Marquee so it allows several events to be observed. These are:
  • start
  • stop
  • change
  • before
  • after
You can find examples and the project page.

Tags: ,

3 Responses to “Prototype Marquee”

  1. Mateo Tibaquirá Says:

    Hey Kevin!
    Excellent stuff man!

    This class is in my To-Do list to integrate with the ZIkula web framework (my prefered one) but i have an issue: why no IE compatibility tests? You may hate IE as i do, but seems that this great class is not working on IE? i would like to have no concerns about IE, but well, you know…

    Thanks a lot and keep it up!

  2. admin Says:

    Sorry for the lack of support for IE. Since I develop on a Mac 99% of the time, it has just been hard to break away lately to test the script in IE. I will make that my priority over the next few days and upload any necessary updates. Thanks for your interest and support.

  3. Mateo Tibaquirá Says:

    Cool :-)
    I develop over Linux 100% of the time, and have to use emulators to test IE, or sometimes browsershots services out there when it’s XHTML + CSS. I’ll begin the integration right now!

    Looking forward for the minor fixes for IE ;-)
    and thanks a lot again!

Leave a Reply

Search

  • Article Categories

  • 2008 © kevinandre. All rights reserved.
    Powered by WordPress
    9 spam comments
    blocked by
    Akismet