You are here: Reference > JavaScript > client-side > HTML DOM > properties > trueSpeed (marquee)

trueSpeed property (marquee)

Browser support:
Sets or retrieves whether the value of the scrollDelay property should be taken as an exact value or not.
If truespeed mode is on, any scrollDelay value less than 60 will be replaced with 60. If the value of the scrollDelay property is greater than 60, the trueSpeed property has no effect.
Note that the browser support of the trueSpeed property in JavaScript and the browser support of the TRUESPEED attribute in HTML are different. Google Chrome and Safari support the TRUESPEED attribute but do not support the trueSpeed property.

Syntax:

object.trueSpeed;
You can find the related objects in the Supported by objects section below.
This property is read/write.
HTML page for this property: TRUESPEED

Possible values:

Boolean that indicates the rendering regulation of the marquee element.
One of the following values:
false
Default. The value of the scrollDelay property cannot be less than 60.
true
The value of the scrollDelay property always specifies the exact delay.
Default: false.

Example HTML code 1:

This example illustrates the use of the trueSpeed attribute:
<marquee scrollamount="3" scrolldelay="6" >Hi There!</marquee>
<marquee scrollamount="3" scrolldelay="6" truespeed="truespeed">Hi There!</marquee>
Did you find this example helpful? yes no

Example HTML code 2:

This example illustrates the use of the trueSpeed property:
<head>
    <script type="text/javascript">
        function ToggleTrueSpeed (buttonElem) {
            var marquee = document.getElementById ("myMarquee");
            
            if ('trueSpeed' in marquee) {
                buttonElem.innerHTML = (marquee.trueSpeed) ? "Allow trueSpeed!" : "Deny trueSpeed!";
                marquee.trueSpeed = !marquee.trueSpeed;
            }
            else {
                alert ("Your browser doesn't support this example!");
            }
        }
    </script>
</head>
<body>
    <marquee id="myMarquee" scrollamount="3" scrolldelay="3" truespeed="truespeed">Hi There!</marquee>
    <button onclick="ToggleTrueSpeed (this);">Deny trueSpeed!</button>
</body>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content