jquery progress bar Plugin Progress bar small problem Solving _jquery

Source: Internet
Author: User
Summary of personal use:
Copy Code code as follows:

<script type= "Text/javascript" src= "/scripts/jquery-1.4.4.min.js" ></script>
<script type= "Text/javascript" src= "/scripts/method/jquery.progressbar.min.js" ></script> " Progresbar Plug-ins are important.
<script type= "Text/javascript" >
$ (document). Ready (function () {
$ ("#progress1"). ProgressBar (barimage: '/content/images/progressbg_red.gif '});
});
</script>
<div id= "Progress1" > </div>

jquery Progress Bar is a progress bar based on jquery development, adhering to the minimalist philosophy of jquery.
Not only easy to use, but also easy to customize the appearance. For projects that use the jquery framework,
This is a good choice when you need to use a progress bar control.
The JQuery Progress Bar, like a regular plug-in, simply selects an HTML element with the selector,
You can invoke the public method of the plug-in directly. It provides a public method name of ProgressBar ().
So, when you have an element with an ID of PROGRESS1 on an HTML page, you can initialize the control like this:
$ ("#progress1"). ProgressBar ();
Its constructor can receive the parameters shown in the following table.

Methods and Parameters

Use

ProgressBar ()

Initializes a progress bar by default setting

ProgressBar (persent)

Initializes or updates a progress bar by default, setting the percentage of the progress bar to persent%.

ProgressBar (config)

Initializes a progress bar by setting the settings specified in config as a percentage of 0%. Note Do not use this method to change the settings of the progress bar after initialization, or it may cause an abnormal display.

ProgressBar (Persent,config)

Initializes a progress bar by setting the settings specified in config as a percentage of persent%. Note Do not use this method to change the settings of the progress bar after initialization, or it may cause an abnormal display.

Where theconfig parameter is a hash structure object that contains the following properties for setting the appearance characteristics of the progress bar

Property

Use

Increment

Sets the degree of growth for each step of the progress bar. The default value is 2.

Speed

Sets the speed of the dynamic sliding effect when the progress bar is initialized. The default value is. The larger the value, the slower the sliding speed.

Showtext

Sets whether to display the percentage identification text. The default value is ture, which is the display percentage text ID.

Boximage

Sets the border picture. The default value is images/progressbar.gif. To customize the border, modify the property to point to the picture you want to use.

Barimage

Sets the progress identification picture. The default value is Images/progressbg_green.gif. To customize it, modify the property to point to the picture you want to use. This image is categorized into two sections, and the first half is used to identify the completion progress, and the latter part to identify the remaining unfinished progress. The two sections are equal in length and equal to the width of the progress bar.

Width

Sets the width of the progress bar, which must match the picture pointed to by Barimage and Boximage. The default value is.

Height

Sets the height of the progress bar, which must match the picture pointed to by Barimage and Boximage . The default value is.

Copy Code code as follows:

$ (document). Ready (function () {
$ ("#spaceused1"). ProgressBar ();
$ ("#spaceused2"). ProgressBar ({barimage: ' images/progressbg_yellow.gif '});
$ ("#spaceused3"). ProgressBar ({barimage: ' Images/progressbg_orange.gif ', showtext:false});
$ ("#spaceused4"). ProgressBar (Showtext:false, {barimage: ' images/progressbg_red.gif '});
$ ("#uploadprogressbar"). ProgressBar ();
});

http://t.wits.sg/misc/jQueryProgressBar/demo.php#

http://www.bram.us/projects/js_bramus/jsprogressbarhandler/#download

<script type= "Text/javascript" > $ ("#loading"). Fadeout () </script>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.