#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    57
    Rep Power
    2

    Use a Class Instead of a Script to Load the Function!


    EDITED:

    - I currently got my rainbow effect to work by using Jquery and by using classes without any lags! YAY me! Im learning.


    However, i am trying to use my script for my forum and this is where i need the help.

    In my code, i need to use a script to load up the effect rather than using a class name..

    Instead of doing -
    Code:
    <span class="rain"><script type="text/javascript">rainbow('rain','Money');</script></span>
    It will load like this:
    Code:
    <span class="rain">Money</span>
    The reason why i need classes is because if i want to do the effect for multiple users then they need their own class.

    For now it works like this:
    Code:
    <span class="rain"><script type="text/javascript">rainbow('rain','Money');</script></span>
    
    <span class="rainbow"><script type="text/javascript">rainbow('rainbow','Testing');</script></span>

    But i want it to be like this:
    Code:
    <span class="rain">Money</span>
    <span class="rainbow">Testing</span>
    Last edited by ide; July 18th, 2013 at 05:11 PM.
  2. #2
  3. A Not To Shabby Code Smurf
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Aug 2008
    Posts
    1,132
    Rep Power
    119
    Originally Posted by ide
    Hello,

    I am having JS troubles once again and it's the JS for rainbow text animated isn't working properly. It only does the affect once then the username does not work anymore.

    Example:

    1) VIP Group have the Rainbow Style

    2) I am in that Group

    3) Since i posted last in my shoutbox i will have the rainbow effect.

    4) Everyone else's including mines username after will come up black rather than rainbowish.

    Does anyone have a clue why?! It's very frustration. I try using different JS code but i get the same thing.

    DO i need to use JQuery instead? Or can JQuery be a reason on why it only working once.
    Did you change something from your original code; if so, just re-edit it? What kind of error(s) are you getting in your browser's developer console?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    57
    Rep Power
    2
    Originally Posted by web_loone08
    Did you change something from your original code; if so, just re-edit it? What kind of error(s) are you getting in your browser's developer console?
    I updated my post! If you need the source code then please PM me. I do not want tons of people seeing the code! lol
    Last edited by ide; July 18th, 2013 at 05:11 PM.

IMN logo majestic logo threadwatch logo seochat tools logo