View Full Version : rainbow text
pondini
08-29-2006, 02:56 AM
1) Script Title: rainbow.js
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex5/rainbow.htm
3) Describe problem: how would i code this to make plain text exhibit the rainbow effect without mousing over it?
tia;)
jscheuer1
08-29-2006, 07:28 AM
I am assuming that your request includes stopping the rainbow effect onmouseover of links. If so, first comment out this section of the script (additions red):
/*if (document.all) {
document.onmouseover = doRainbowAnchor;
document.onmouseout = stopRainbowAnchor;
}
else if (document.getElementById) {
document.captureEvents(Event.MOUSEOVER | Event.MOUSEOUT);
document.onmouseover = Mozilla_doRainbowAnchor;
document.onmouseout = Mozilla_stopRainbowAnchor;
}*/
Now, say you want a division to be rainbow - Insert the call for the (now modified) script into the head of the page like before and put this in the body of your page:
<div id="rain">Hi There</div>
<script type="text/javascript">
doRainbow(document.getElementById('rain'));
</script>
pondini
08-31-2006, 12:53 AM
thanx, jscheuer1! i'll give it a go and report back, bro:)
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.