Quackit Logo
HTML
CSS
Scripting
Database
Hosting
Design
XML

Print Version

Stopping & Starting HTML Marquees

This page contains code that allows you to stop and start HTML marquees with your mouse. Therefore, your website users can stop/start your HTML marquees with their mouse too.

These codes use JavaScript, and therefore, will not work on your MySpace page. You can still use marquee codes on your MySpace page though, you just won't be able to stop/start them with JavaScript.

Clicking the Marquee

This example allows the user to stop the marquee when they click on the mouse (i.e. onmousedown). The marquee then continues when the user releases the mouse (i.e. onmouseup).

This code results in:

Go on... click me (and hold the mouse down)!

Hovering over the Marquee

This example allows the user to stop the marquee when they hover over the marquee with their cursor (i.e. onmouseover). The marquee then continues when the user hovers away from the marquee (i.e. onmouseout).

This code results in:

Go on... hover over me!

Start/Stop Buttons:

You can add "start" and "stop" buttons that enable the user to start and stop the marquee as required. To do this, simply add an "id" attribute to the marquee, then reference that from your buttons (created using the input tag).

This code results in:

Go on... press the button!

Stopping Multiple Marquees:

You can add "start" and "stop" buttons for as many marquees as you like. Just make sure you give each marquee a unique "id". For example, if you name your first marquee "marquee1", name the second marquee "marquee2" etc.

This code results in:

Marquee 1

Marquee 2


Slowing Down Your Marquee

You can also make the marquee slow down instead of just stopping/starting. Here's the code to slow down & speed up your marquee.

MySpace Users

Unfortunately, you can't use the above examples in your MySpace profile. This is because MySpace doesn't allow you to put JavaScript in your profile (these examples use JavaScript to stop and start the marquee).

You can however, use the examples on the HTML Marquee Codes page.

More Marquee Tricks

Here are more tricks you can use with your marquees:

Enjoy this website?

  • Share
  • Add this page to your Favorites
  • Link to this page (copy/paste into your own website or blog):
  • Link to Quackit using one of these banner ads.
  • Help support Quackit by making a donation

Oh, and thank you for supporting Quackit!

© Copyright 2000 - 2010 Quackit.com