Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9141243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:37:11+00:00 2026-06-17T09:37:11+00:00

This is what i´m trying to achieve: The user will have the option to

  • 0

This is what i´m trying to achieve:

enter image description here

The user will have the option to add more years (a new circle with text and the next color in the gradient).

So what i´m doing is building a div that by repeating itself it can construct the above image.

This is the markup:

     <a href="javascript:void(0)" class="timeline_box">
        <span class="timeline_dot"></span>
        <span class="timeline_year">2003</span>
    </a>

This is the CSS:

    a.timeline_box{
        background: url('../images/timeline_bg.png') no-repeat 15px -2px;
        display: block;
        width: 56px;
        height: 20px;
        float: left;
    }
    span.timeline_dot{
        display: block;
        height: 14px;
        width: 14px;
        background-color: #ff845a;
        -moz-border-radius: 5px;
        -webkit-border-radius: 10px;
        -khtml-border-radius: 5px;
        border-radius: 10px;
    }
    span.timeline_year{
        color: #b6b6b6;
        font-size: 10px;
        font-style: italic;
        font-family: Georgia, Times, "Times New Roman", serif;
        vertical-align: top;
    }

This is what I get:

enter image description here

and if I repeat the timeline_box it start to construct well:

enter image description here

The client now can change the year but the problem is that the background color of the circle will stay always the same, I want to find a way to change it with jquery that with every new year the background of the circle get´s the next color on the gradient or something like that.

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T09:37:12+00:00Added an answer on June 17, 2026 at 9:37 am

    Never tried something of this kind – changing colors while following the color gradient or whatever. Thought it would be trickier than it is. The hsl color format makes it pretty easy to do. To “follow the gradient” you just need to keep incrementing the h in hsl – the logic is simple.

    Here’s the javascript:

    var $box = $('.timeline_box'),
        h_val = 0;
    
    function addBox () {
      var $new_box = $box.clone();
      h_val += 17; //change this value to change the amount of color change
    
      $new_box
        .find('.timeline_dot')
        .css('background', 'hsl('+ h_val +', 100%, 68%)') //change the "s" and "l" values to your liking
        .end()
        .appendTo('body'); 
    }
    
    $('#el').on('whatever', addBox);
    

    There’s not even the need to reset the h to 0 at some whatever point. The h can keep going on and on, and it’ll just keep cycling the gradient.

    Here’s a jsbin: http://jsbin.com/oqifoq/1/edit

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to achieve exactly something like this - a text view on
I have a Learn More button that when the user hovers over, will display
This is what I am trying to achieve: if a property is set then
I am trying to achieve something like this. The Expandable List consists of the
I'm trying to achieve what this guy here is doing, only in PHP or
I am trying to achieve this effect where a photo gets a repeating pattern
I'm trying to achieve URLs like this in Rails: http://localhost/posts/1234/post-slug-name with both ID and
I am trying to achieve this using Expression Blend 3. I need that every
this is the scenario i'm trying to achieve: a sound stored on the same
I'm trying to achieve something similar to jQuery Glow or this fiddle . Specifically

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.