Expanding and Shrinking Text Banner

Get your visitor's attention with an animated text banner. With this script you supply an array of text entries that are to be displayed in the banner area. Each will be displayed in turn effectively starting with zero size and growing until it reaches your specified maximum fiont size. It will then remain displayed for a set period before shrinking back down to zero size and being replaced by the next entry from the array (wrapping back to the start of the array automatically once the end of the array is reached).

Getting this effect on your web page is extremely simple. First copy the following and attach it into your web page immediately before the </body> tag.

JavaScript

Next replace the list of text entries in the array at the end of the script with your selected text entries and if you need to adjust the speed of the animation or the maximum font size to use adjust the numbers at the bottom of the script as well. Finally add a div tag where you want the banner to be displayed in your page with an id that matches the very last entry in the script (you can change that value if you already have an id=btx" elsewhere in your page).

<div id="btx"></div>

 

This article written by Stephen Chapman, Felgall Pty Ltd.

Related Articles

  • Browser Problems and Cookies
  • JavaScript Variables and Operators
  • First Focus
  • What Javascript Can't Do.
  • Unobtrusive Slideshows With Optional Captions

spacer

FaceBook Follow
Twitter Follow
Tweet
spacer
gipoco.com is neither affiliated with the authors of this page nor responsible for its contents. This is a safe-cache copy of the original web site.