Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Javascript Help

  1. #11

    Default

    Quote Originally Posted by iUnknown View Post
    Can't edit, please merge my posts.

    This is now my code:

    Code:
    function imgChange1() {
    document.getElementById('banner').className ='banner1';
    }
    
    function imgChange2() {
    document.getElementById('banner').className ='banner2';
    }
    
    function imgChange3() {
    document.getElementById('banner').className ='banner3';
    }
    
    function imgChange4() {
    document.getElementById('banner').className ='banner4';
    }
    
    function imgChange5() {
    document.getElementById('banner').className ='banner5';
    }
    Quick google search:
    http://brainerror.net/scripts/javascript/blendtrans/
    That seems to outline what you're trying to do, good luck!

  2. #12
    Join Date
    Dec 2006
    Location
    Swindon
    Posts
    3,299
    Tokens
    215
    Habbo
    dunko

    Latest Awards:

    Default

    Quote Originally Posted by iUnknown View Post
    Can't edit, please merge my posts.

    This is now my code:

    Code:
    function imgChange1() {
    document.getElementById('banner').className ='banner1';
    }
    
    function imgChange2() {
    document.getElementById('banner').className ='banner2';
    }
    
    function imgChange3() {
    document.getElementById('banner').className ='banner3';
    }
    
    function imgChange4() {
    document.getElementById('banner').className ='banner4';
    }
    
    function imgChange5() {
    document.getElementById('banner').className ='banner5';
    }
    What can I add to the functions to make it do that with a fade?

    Thanks.
    Try using jquery

    Also your code will be much better like this:

    Code:
    function imgChange( number ) {
    document.getElementById('banner').className ='banner' + number;
    }

  3. #13

    Default

    Quote Originally Posted by Blob View Post
    Try using jquery

    Also your code will be much better like this:

    Code:
    function imgChange( number ) {
    document.getElementById('banner').className ='banner' + number;
    }
    Hah, I was originally planning on posting that until i forgot what the sign was to connect the submitted thing into it was (the +). I'll +rep you if I can; and also good luck Unknown, you'll get their sometime!

    Edit: @Blob : must spread!

  4. #14
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    I ended up getting this done professionally now because I realised it wasn't something I could do or get done for free. All working now after a ton of effort due to countless problems with integration into the layout, and looking at the code I was pretty far off. Didn't use jquery in the end, just custom coded by a pro.

    Thanks for everyone's help - useful contributions have received +rep where possible.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  5. #15
    Join Date
    Apr 2009
    Location
    United Kingdom
    Posts
    1,111
    Tokens
    100

    Latest Awards:

    Default

    Quote Originally Posted by iUnknown View Post
    I ended up getting this done professionally now because I realised it wasn't something I could do or get done for free. All working now after a ton of effort due to countless problems with integration into the layout, and looking at the code I was pretty far off. Didn't use jquery in the end, just custom coded by a pro.

    Thanks for everyone's help - useful contributions have received +rep where possible.
    I would've done your javascript for free lol. If you had sent me the files you wanted it built into, I would've done it.

  6. #16
    Join Date
    Mar 2008
    Location
    Swindon, UK
    Posts
    1,274
    Tokens
    187
    Habbo
    :Ltd

    Latest Awards:

    Default



    jQuery is used by "pros".
    Hi, names James. I am a web developer.

Page 2 of 2 FirstFirst 12

Posting Permissions

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