Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Dynamic Changing Background

    I need some help with coding a Dynamic Chanign Background. I have never don jQuery/Java its somthing im learning. Can anyone give me the code or help me with the coding of it. Any sugestions are all good.
    Thanks all of you that post
    -Hampo
    http://gargox.info/

  • #2
    Senior Coder jmrker's Avatar
    Join Date
    Aug 2006
    Location
    FL
    Posts
    3,108
    Thanks
    38
    Thanked 498 Times in 492 Posts

    Question

    Quote Originally Posted by hampo123 View Post
    I need some help with coding a Dynamic Chanign Background. I have never don jQuery/Java its somthing im learning. Can anyone give me the code or help me with the coding of it. Any sugestions are all good.
    Thanks all of you that post
    -Hampo
    http://gargox.info/
    Can you define your request with a bit more specificity?
    How do you wish to change the background dynamically?
    When is it supposed to change. Why does it change?

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,155
    Thanks
    203
    Thanked 2,548 Times in 2,526 Posts
    Quote Originally Posted by hampo123 View Post
    I need some help with coding a Dynamic Chanign Background. I have never don jQuery/Java its somthing im learning. Can anyone give me the code or help me with the coding of it. Any sugestions are all good.
    Thanks all of you that post
    -Hampo
    http://gargox.info/
    And spell your post rather better, please. Computer coding requires great accuracy, and careless errors will soon bring you to grief.

    Be aware that Java and Javascript are entirely different programming languages, in spite of the confusingly similar names. Rather like Austria and Australia!

    All the code given in this post has been tested and is intended to address the question asked.
    Unless stated otherwise it is not just a demonstration.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,588
    Thanks
    80
    Thanked 4,497 Times in 4,461 Posts
    Also, changing a true background (either color or image) can only be done all at once. No ability to make nice fade effects, etc.

    So the better way is to use overlaid <div>s, with (say) your main div with the text, etc., having a higher z-index than the other one. Now you can put an <img> in the "behind" div and use fade effects, etc., on it.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

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