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 8335813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:47:13+00:00 2026-06-09T03:47:13+00:00

these are the codes for the two <div> s that are used to represent

  • 0

these are the codes for the two <div>s that are used to represent a progress bar (jquery ui progress bar):

<div style="margin-left: 10px; margin-right: 10px; font-size: 10px;" id="progressbar2"> </div>
<div style="margin-left: 10px; margin-right: 10px; font-size: 10px;" id="progressbar"> </div>

this is the jquery that is used to set the value and get the value for the progress bar

<script>   
$(document).ready(function() {
    var progValue1 = <%=ProgValue1%>;   
    var progValue2 = <%=ProgValue2%>;    
    $("#progressbar").progressbar({ value: progValue1});   
    $("#progressbar2").progressbar({ value: progValue2 });   
});   
</script>  

on the back end code this is how i transfer the value for the progress bar :

private int _progValue1 = 100;
private int _progValue2 = 30;

public int ProgValue1 { get { return this._progValue1; } set { _progValue1 = value; } }
public int ProgValue2 { get { return this._progValue2; } set { _progValue2 = value; } }

When a confirm button is clicked this is the code used in the click method to change the value for the progress bar :

this.ProgValue1 = 0;
this.ProgValue2 = 100;

this way all I am doing is changing the value of progressbar from 100 to 0 and the value of progressbar2 from 30 to 100.

Is there a way to change the value in such a fashion so that this can be animated as if the first progress bar is gradually decreasing to 0 and the progressbar2 is increasing to 100?

Thanx in advance

  • 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-09T03:47:16+00:00Added an answer on June 9, 2026 at 3:47 am

    Take a look at the below one…

    <html>
    <head>
    <link type="text/css" href="jquery-ui-1.8.22.custom.css" rel="Stylesheet" />
    
    <script type="text/javascript" src="jquery-1.7.2.js"></script>
    <script type="text/javascript" src="jquery-ui-1.8.22.custom.min.js"></script>
    <script type="text/javascript">
    var increase = 0;
    var decrease = 100;
    
    $(document).ready(function() {
        var anim = setInterval(function(){
            $("#progressbar1").progressbar({
                value: increase ++          
            });
            $("#progressbar2").progressbar({
                value: decrease --          
            });
            if(increase == 100){
                // clearInterval(anim);
                increase = 0;
                decrease = 100;
            }
        }, 50);
    });
      </script>
    </head>
    <body>
     <div id="progressbar1" style="width: 500px; height: 15px;"></div><br />
     <div id="progressbar2" style="width: 500px; height: 15px;"></div>
    </body>
    </html>
    

    The animation stops when you remove the comments to this line clearInterval(anim)

    Hope this helps!

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

Sidebar

Related Questions

I created two dropdpwn calendar in my form with these codes: <script type=text/javascript src=http://code.jquery.com/jquery-latest.js></script>
I have used two div tags in my blog to wrap programming codes. The
I have these codes for my two tabs. I would like to change the
What is the difference between these two codes : public uint? a; public uint
What are the differences between these two codes in JavaScript? var obj = new
Given the Java code below, what's the closest you could represent these two static
I have a single view that is used by two Controller Actions. My Controller:
right now , I use jQUery(document).ready to inject javascript into a div. All is
I have two web pages; Foo.aspx and Bar.aspx. Bar.aspx uses jQuery.ajax() to request a
I have these two codes lines in subnativation. <%= link_to Basic Info, request.request_uri +

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.