Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Scroll script colour change help..!

SpaceshipSpaceship
SpaceshipSpaceship
SpaceshipSpaceship
Watch

Eggspit

Established Member
Impact
8
Hi folks,

I am using the bellow script to scroll text quotes from right to left in a standard Marquee style.

It works fairly spot on to what’s required, but I would like to have the opportunity to possibly change the font colour for part of the quotes so for example the ending quote "- by person" is a different colour to the rest of the quote text!

Any ideas how this can be achieved, not sure if it's an easy fix or not?!!
With thanks

Egg

------------------------------------

html>
<head>
<title>Marquee</title>
<script type="text/javascript">
var phrases = [
"Quote number 1 - by person 1",
"Quote number 2 - by person 2",
"Quote number 3 - by person 3",
"Quote number 4 - by person 4"
];

function pickone()
{
document.getElementById("PAUSER").innerHTML =
phrases[ Math.floor( Math.random() * phrases.length ) ];
}
</script>
<style type="text/css">
marquee#PAUSER
{
font-family: calibri, verdana, arial, sans-serif;
font-size: 12pt;
color: #ffff00;
cursor: hand;
}
body
{
background-color: black;
}
</style>
</head>
<body onload="pickone()">
<marquee id="PAUSER" scrollamount="5"
onmouseover="this.scrollAmount=0;" onmouseout="this.scrollAmount=5;">
</marquee>
</body>
</html>

------------------------------------

Thanks again
Egg
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Had an idea..,

I could make the quotes a graphic (so I get the second colour), but do you know how i would adapt the code to scroll random images (horizontally) rather then text?

Thanks in advance
Egg
 
0
Close
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Search: choose where to search from the All tab
Open the search at the top of any page. On the All tab, the list next to the search box lets you choose where to search: everything, all...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back