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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:27:16+00:00 2026-05-27T09:27:16+00:00

How can I draw two or more jQuery progressbar with diffrent values inside the

  • 0

How can I draw two or more jQuery progressbar with diffrent values inside the same div?

I need to draw two progress bars in a single div, this means I can give only one id to the function that creates progressBar.

Currently my function is:

function drawbar(no,id_of_div) 
{
                 $(id_of_div).progressbar({ value:no });
                 $(id_of_div).css({background: '#99FF66'}); 
 }

I want a function that will also take a value for a second progress bar which should be drawn inside the same div.

Something like:

function drawbar(value_for_first , value_for_second ,id_of_div)
{
---------
------
}

Can any body help me?

  • 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-05-27T09:27:17+00:00Added an answer on May 27, 2026 at 9:27 am

    I think you’re going to have to put divs within the div, since it looks like the jQuery UI progressbar fills its target element. E.g.:

    function drawbar(value_for_first, value_for_second, id_of_div) {
        var target = $("#" + id_of_div);
        $("<div>").appendTo(target).progressbar({value: value_for_first});;
        $("<div>").appendTo(target).progressbar({value: value_for_second});
    }
    

    Live example

    They may need height, if you’re not doing that with CSS (e.g., css("height", "50%")). (I haven’t used the jQuery UI progress bar.)

    If you’re updating them with the same function, the we’d want to allow for them possibly already being there:

    function drawbar(value_for_first, value_for_second, id_of_div) {
        var target = $("#" + id_of_div),
            first  = target.find(".first"),
            second = target.find(".second");
        if (!first[0]) {
            first  = $("<div>").addClass("first").appendTo(target);
            second = $("<div>").addClass("second").appendTo(target);
        }
        first.progressbar({value: value_for_first});
        second.progressbar({value: value_for_second});
    }
    

    Live example – note that it shows initial values, then pauses a second, then updates them

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

Sidebar

Related Questions

I have my program that can draw rectangles. I have two problems I can't
I have two OverlayItem's on a MapView. How can I draw a route between
I need a UIImageView that can draw itself in color or b/w according to
I can draw many things using this : NSString *imagePath = [[NSBundle mainBundle] pathForResource:@dummy2.png
In Visual studio I can draw 13 different application-icons in different resolutions and color
Any idea how I can draw Bullet Points using Flex? instead of using image
I have mysql database and I want a software which can draw the database
I have an NSView in which the user can draw circles. These circles are
I'm trying to set up something in SDL [in C++] where I can draw
Terminology question ! In many graphics packages the user can draw a line between

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.