Marquee

Javascript replacement of non-standard <marquee> html element

Summary
MarqueeJavascript replacement of non-standard <marquee> html element
Functions
Marquee
startStarts moving the content.
stopStops moving the content.
changedShould be called when the content has been changed dynamically.

Functions

Marquee

var Marquee = function(args)
Parameters: argsobject with the following optional elements:
idid of the html element to be turned to marquee
elthe html element
dir [_left_|right|up|down]direction to move the content to
jumphow many pixels the content is jumped each step
waithow many miliseconds to wait between each step
mouseStopsbool. default: true
callbackfunction to be called on events
function callback(action, args) {...}
  • action [init,start,stop,chg1,chg2,chg3]
  • args - object: {id, el}

start

this.start = function()

Starts moving the content.

stop

this.stop = function()

Stops moving the content.

changed

this.changed = function()

Should be called when the content has been changed dynamically.  Copies the original content and recalculates extra_margin.  Needed for flowless movement when the content ends and starts again.

var Marquee = function(args)
this.start = function()
Starts moving the content.
this.stop = function()
Stops moving the content.
this.changed = function()
Should be called when the content has been changed dynamically.
Close