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

  • Home
  • SEARCH
  • 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 9043205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:41:20+00:00 2026-06-16T10:41:20+00:00

I am trying to implement a sliding progrees bar. I want the progress to

  • 0

I am trying to implement a sliding progrees bar. I want the progress to gradually increase.

I try:

HTML

<div id="progressKeeper">
<div id="progress"></div>
</div>

CSS

#progressKeeper {
    width: 800px;
    height: 25px;
    border: 3px double #003366;
    margin: 0px 10px;
    padding: 3px;
}

JavaScript

var el = $('#progress');
var steppedIncreaseAmount = ($('#progressKeeper').width()) / 100;
for (var i = 0; i < 100; i++) {
    el.width(el.width() + steppedIncreaseAmount+ 'px');
}

See this jsfiddle

But it just increases suddenly. I want a smooth effect, like a fade.

  • 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-16T10:41:21+00:00Added an answer on June 16, 2026 at 10:41 am

    You need to set some kind of delay between the update of these values. However, because it appears that you’re using jQuery, you can easily do something like this:

    $(document).ready(function() {
        var el = $('#progress');
        el.animate({
            width: "100%"
        }, 1800);
    });​
    

    http://jsfiddle.net/VbVBP/2/

    Another way, if you really want to keep the setup you’ve got going now, would be do just add a setTimeout counter to your for loop like this:

    var el = $('#progress');
    var steppedIncreaseAmount = ($('#progressKeeper').width()) / 100; 
    for (var i = 0; i < 100; i++) {
        setTimeout(function(){
            el.width(el.width() + steppedIncreaseAmount+ 'px');
        }, 1+i*20);
    }​
    

    http://jsfiddle.net/VbVBP/3/

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

Sidebar

Related Questions

Trying to implement 3-layer (not: tier, I just want to separate my project logically,
I am totally new to android, i am trying to implement Sliding Menu having
I'm trying to implement a sliding menu just like the one found in Google's
I'm trying to implement simple sliding window alogirithm on two-dimensional array in C# 3.0,
I am trying implement Unblock me Puzzle. i want to change image position from
The slider/carousel I'm trying to implent is this: http://www.paulwelsh.info/jquery-plugins/hero-carousel/ This is my HTML, CSS
I am trying to implement a sliding drawer where handler is a button/text. The
I'm trying to implement a SlidingDrawer that will occupy the full screen width, but
Trying to implement windows Progressbar showing progress of download in bytes with big numbers,
Ok, so I'm trying to implement a sliding video thumb gallery linked to a

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.