Banner.js

Oct 9, 2003

1 min read

Win95

Win98

WinME

Win2K

WinXP

Win2003

Javascript

Windows

Dev

Intermediate

Author picture

by Per S

Contributor

88k Views

Introduction

I was looking for a JavaScript banner solution that allows me to run banners on my web, when I discovered the BarelyFitz JavaScript slideshow. It's the best slideshow script I've seen, and I decided to use if for my banners.

Inheritance

The easiest method to "borrow" somebody else's code, is through inheritance. Using Nicholas C. Zakas's technique makes inheritance in JavaScript a dream:

JSCRIPT
Object.prototype.extend = 

The Banner Class

The reason I wrote this banner class, was to be able to have two (or more) banners on one page. The banner class acts as a wrapper around the slideshow class and inherits slideshow's methods and properties.

You'll find a demo here.

Prerequisite

BarelyFitz JavaScript slideshow.js.

The code

JSCRIPT
<HEAD>
<SCRIPT type=

Have fun coding.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)