Results 1 to 3 of 3

Thread: rainbow text

  1. #1
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default rainbow text

    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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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):

    Code:
    /*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:

    HTML Code:
    <div id="rain">Hi There</div>
    <script type="text/javascript">
    doRainbow(document.getElementById('rain'));
    </script>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanx, jscheuer1! i'll give it a go and report back, bro

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •