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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Anyone help a beginner with JS default thumbnails

    i'm currently learning html and css. I'm working on a blogger blog template.

    My template has a front page of post thumbnails.

    I have set a class for my default thumbnail for when my posts do not have an image and I have set the url in the css.

    .altthumbnails {
    background: url(myimagelocation.jpg);
    }
    is there any way I can make more than one default thumbnail? I would like to chose maybe three images to show at random when there is no post image.

    Is there any js that could be explained for a learner?




    Thanks for any replies

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,680
    Thanks
    6
    Thanked 1,009 Times in 982 Posts
    Your question is too general. Without any code of yours you will not receive any useful reply here.

  • #3
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,033
    Thanks
    203
    Thanked 2,539 Times in 2,517 Posts
    Quote Originally Posted by brook99 View Post
    is there any way I can make more than one default thumbnail? I would like to chose maybe three images to show at random when there is no post image.
    You need to be clearer in your question. Do you want to show three default images, or one default image selected at random from three? Show the relevant code, please.

    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.


  •  

    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
    •