<!DOCTYPE html> <html lang="en"> <head> <link href="css/jquery-ui-1.8.16.custom.css" rel="stylesheet" type="text/css"/> <link href="css/main.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="js/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script> <script type="text/javascript" src="js/script.js"></script> <title>Animated jQuery progressbar | Script tutorials</title> </head> <body> <div class="example"> <h3><a href="http://www.script-tutorials.com/animated-jquery-progressbar/">Animated jQuery progressbar | Script Tutorials</a></h3> <div id="progress1"> <div class="percent"></div> <div class="pbar"></div> <div class="elapsed"></div> </div> <hr /> <div id="progress2"> <div class="percent"></div> <div class="pbar"></div> <div class="elapsed"></div> </div> <hr /> <div id="progress3"> <div class="percent"></div> <div class="pbar"></div> <div class="elapsed"></div> </div> </div> <hr style="clear:both;" /> <h4><a href="http://www.script-tutorials.com/animated-jquery-progressbar/" rel="nofollow">back to original tutorial page</a></h4> </body> </html>
1 /*! 2 * jQuery UI 1.8.16 3 * 4 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 * Dual licensed under the MIT or GPL Version 2 licenses. 6 * http://jquery.org/license 7 * 8 * http://docs.jquery.com/UI 9 */ 10 (function(c,j){function k(a,b){var d=a.nodeName.toLowerCase();if("area"===d){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&l(a)}return(/input|select|textarea|button|object/.test(d)?!a.disabled:"a"==d?a.href||b:b)&&l(a)}function l(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.16", 11 keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({propAttr:c.fn.prop||c.fn.attr,_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d= 12 this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this,"position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this, 13 "overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position");if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart": 14 "mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,m,n){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(m)g-=parseFloat(c.curCSS(f,"border"+this+"Width",true))||0;if(n)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight, 15 outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h,d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){return k(a,!isNaN(c.attr(a,"tabindex")))},tabbable:function(a){var b=c.attr(a, 16 "tabindex"),d=isNaN(b);return(d||b>=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& 17 a.element[0].parentNode)for(var e=0;e<b.length;e++)a.options[b[e][0]]&&b[e][1].apply(a.element,d)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(a,b){if(c(a).css("overflow")==="hidden")return false;b=b&&b==="left"?"scrollLeft":"scrollTop";var d=false;if(a[b]>0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a<b+d},isOver:function(a,b,d,e,h,i){return c.ui.isOverAxis(a,d,h)&& 18 c.ui.isOverAxis(b,e,i)}})}})(jQuery); 19 ;/*! 20 * jQuery UI Widget 1.8.16 21 * 22 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 23 * Dual licensed under the MIT or GPL Version 2 licenses. 24 * http://jquery.org/license 25 * 26 * http://docs.jquery.com/UI/Widget 27 */ 28 (function(b,j){if(b.cleanData){var k=b.cleanData;b.cleanData=function(a){for(var c=0,d;(d=a[c])!=null;c++)try{b(d).triggerHandler("remove")}catch(e){}k(a)}}else{var l=b.fn.remove;b.fn.remove=function(a,c){return this.each(function(){if(!c)if(!a||b.filter(a,[this]).length)b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(d){}});return l.call(b(this),a,c)})}}b.widget=function(a,c,d){var e=a.split(".")[0],f;a=a.split(".")[1];f=e+"-"+a;if(!d){d=c;c=b.Widget}b.expr[":"][f]= 29 function(h){return!!b.data(h,a)};b[e]=b[e]||{};b[e][a]=function(h,g){arguments.length&&this._createWidget(h,g)};c=new c;c.options=b.extend(true,{},c.options);b[e][a].prototype=b.extend(true,c,{namespace:e,widgetName:a,widgetEventPrefix:b[e][a].prototype.widgetEventPrefix||a,widgetBaseClass:f},d);b.widget.bridge(a,b[e][a])};b.widget.bridge=function(a,c){b.fn[a]=function(d){var e=typeof d==="string",f=Array.prototype.slice.call(arguments,1),h=this;d=!e&&f.length?b.extend.apply(null,[true,d].concat(f)): 30 d;if(e&&d.charAt(0)==="_")return h;e?this.each(function(){var g=b.data(this,a),i=g&&b.isFunction(g[d])?g[d].apply(g,f):g;if(i!==g&&i!==j){h=i;return false}}):this.each(function(){var g=b.data(this,a);g?g.option(d||{})._init():b.data(this,a,new c(d,this))});return h}};b.Widget=function(a,c){arguments.length&&this._createWidget(a,c)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(a,c){b.data(c,this.widgetName,this);this.element=b(c);this.options= 31 b.extend(true,{},this.options,this._getCreateOptions(),a);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+ 32 "-disabled ui-state-disabled")},widget:function(){return this.element},option:function(a,c){var d=a;if(arguments.length===0)return b.extend({},this.options);if(typeof a==="string"){if(c===j)return this.options[a];d={};d[a]=c}this._setOptions(d);return this},_setOptions:function(a){var c=this;b.each(a,function(d,e){c._setOption(d,e)});return this},_setOption:function(a,c){this.options[a]=c;if(a==="disabled")this.widget()[c?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled", 33 c);return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(a,c,d){var e=this.options[a];c=b.Event(c);c.type=(a===this.widgetEventPrefix?a:this.widgetEventPrefix+a).toLowerCase();d=d||{};if(c.originalEvent){a=b.event.props.length;for(var f;a;){f=b.event.props[--a];c[f]=c.originalEvent[f]}}this.element.trigger(c,d);return!(b.isFunction(e)&&e.call(this.element[0],c,d)===false||c.isDefaultPrevented())}}})(jQuery); 34 ;/* 35 * jQuery UI Progressbar 1.8.16 36 * 37 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 38 * Dual licensed under the MIT or GPL Version 2 licenses. 39 * http://jquery.org/license 40 * 41 * http://docs.jquery.com/UI/Progressbar 42 * 43 * Depends: 44 * jquery.ui.core.js 45 * jquery.ui.widget.js 46 */ 47 (function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); 48 this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* 49 this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); 50 ;
1 $(document).ready(function(){ 2 jQuery.fn.anim_progressbar = function (aOptions) { 3 // def values 4 var iCms = 1000; 5 var iMms = 60 * iCms; 6 var iHms = 3600 * iCms; 7 var iDms = 24 * 3600 * iCms; 8 9 // def options 10 var aDefOpts = { 11 start: new Date(), // now 12 finish: new Date().setTime(new Date().getTime() + 60 * iCms), // now + 60 sec 13 interval: 100 14 } 15 var aOpts = jQuery.extend(aDefOpts, aOptions); 16 var vPb = this; 17 18 // each progress bar 19 return this.each( 20 function() { 21 var iDuration = aOpts.finish - aOpts.start; 22 23 // calling original progressbar 24 $(vPb).children('.pbar').progressbar(); 25 26 // looping process 27 var vInterval = setInterval( 28 function(){ 29 var iLeftMs = aOpts.finish - new Date(); // left time in MS 30 var iElapsedMs = new Date() - aOpts.start, // elapsed time in MS 31 iDays = parseInt(iLeftMs / iDms), // elapsed days 32 iHours = parseInt((iLeftMs - (iDays * iDms)) / iHms), // elapsed hours 33 iMin = parseInt((iLeftMs - (iDays * iDms) - (iHours * iHms)) / iMms), // elapsed minutes 34 iSec = parseInt((iLeftMs - (iDays * iDms) - (iMin * iMms) - (iHours * iHms)) / iCms), // elapsed seconds 35 iPerc = (iElapsedMs > 0) ? iElapsedMs / iDuration * 100 : 0; // percentages 36 37 // display current positions and progress 38 $(vPb).children('.percent').html('<b>'+iPerc.toFixed(1)+'%</b>'); 39 $(vPb).children('.elapsed').html(iDays+' days '+iHours+'h:'+iMin+'m:'+iSec+'s</b>'); 40 $(vPb).children('.pbar').children('.ui-progressbar-value').css('width', iPerc+'%'); 41 42 // in case of Finish 43 if (iPerc >= 100) { 44 clearInterval(vInterval); 45 $(vPb).children('.percent').html('<b>100%</b>'); 46 $(vPb).children('.elapsed').html('Finished'); 47 } 48 } ,aOpts.interval 49 ); 50 } 51 ); 52 } 53 54 // default mode 55 $('#progress1').anim_progressbar(); 56 57 // from second #5 till 15 58 var iNow = new Date().setTime(new Date().getTime() + 5 * 1000); // now plus 5 secs 59 var iEnd = new Date().setTime(new Date().getTime() + 15 * 1000); // now plus 15 secs 60 $('#progress2').anim_progressbar({start: iNow, finish: iEnd, interval: 100}); 61 62 // we will just set interval of updating to 1 sec 63 $('#progress3').anim_progressbar({interval: 1000}); 64 });
1 /* 2 * jQuery UI CSS Framework 1.8.16 3 * 4 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 5 * Dual licensed under the MIT or GPL Version 2 licenses. 6 * http://jquery.org/license 7 * 8 * http://docs.jquery.com/UI/Theming/API 9 */ 10 11 /* Layout helpers 12 ----------------------------------*/ 13 .ui-helper-hidden { display: none; } 14 .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } 15 .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } 16 .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } 17 .ui-helper-clearfix { display: inline-block; } 18 /* required comment for clearfix to work in Opera */ 19 * html .ui-helper-clearfix { height:1%; } 20 .ui-helper-clearfix { display:block; } 21 /* end clearfix */ 22 .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } 23 24 25 /* Interaction Cues 26 ----------------------------------*/ 27 .ui-state-disabled { cursor: default !important; } 28 29 30 /* Icons 31 ----------------------------------*/ 32 33 /* states and images */ 34 .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } 35 36 37 /* Misc visuals 38 ----------------------------------*/ 39 40 /* Overlays */ 41 .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } 42 43 44 /* 45 * jQuery UI CSS Framework 1.8.16 46 * 47 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 48 * Dual licensed under the MIT or GPL Version 2 licenses. 49 * http://jquery.org/license 50 * 51 * http://docs.jquery.com/UI/Theming/API 52 * 53 * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px 54 */ 55 56 57 /* Component containers 58 ----------------------------------*/ 59 .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } 60 .ui-widget .ui-widget { font-size: 1em; } 61 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } 62 .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } 63 .ui-widget-content a { color: #333333; } 64 .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } 65 .ui-widget-header a { color: #ffffff; } 66 67 /* Interaction states 68 ----------------------------------*/ 69 .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } 70 .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } 71 .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } 72 .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } 73 .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } 74 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } 75 .ui-widget :active { outline: none; } 76 77 /* Interaction Cues 78 ----------------------------------*/ 79 .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } 80 .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } 81 .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } 82 .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } 83 .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } 84 .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } 85 .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } 86 .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } 87 88 /* Icons 89 ----------------------------------*/ 90 91 /* states and images */ 92 .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } 93 .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } 94 .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } 95 .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } 96 .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 97 .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } 98 .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } 99 .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } 100 101 /* positioning */ 102 .ui-icon-carat-1-n { background-position: 0 0; } 103 .ui-icon-carat-1-ne { background-position: -16px 0; } 104 .ui-icon-carat-1-e { background-position: -32px 0; } 105 .ui-icon-carat-1-se { background-position: -48px 0; } 106 .ui-icon-carat-1-s { background-position: -64px 0; } 107 .ui-icon-carat-1-sw { background-position: -80px 0; } 108 .ui-icon-carat-1-w { background-position: -96px 0; } 109 .ui-icon-carat-1-nw { background-position: -112px 0; } 110 .ui-icon-carat-2-n-s { background-position: -128px 0; } 111 .ui-icon-carat-2-e-w { background-position: -144px 0; } 112 .ui-icon-triangle-1-n { background-position: 0 -16px; } 113 .ui-icon-triangle-1-ne { background-position: -16px -16px; } 114 .ui-icon-triangle-1-e { background-position: -32px -16px; } 115 .ui-icon-triangle-1-se { background-position: -48px -16px; } 116 .ui-icon-triangle-1-s { background-position: -64px -16px; } 117 .ui-icon-triangle-1-sw { background-position: -80px -16px; } 118 .ui-icon-triangle-1-w { background-position: -96px -16px; } 119 .ui-icon-triangle-1-nw { background-position: -112px -16px; } 120 .ui-icon-triangle-2-n-s { background-position: -128px -16px; } 121 .ui-icon-triangle-2-e-w { background-position: -144px -16px; } 122 .ui-icon-arrow-1-n { background-position: 0 -32px; } 123 .ui-icon-arrow-1-ne { background-position: -16px -32px; } 124 .ui-icon-arrow-1-e { background-position: -32px -32px; } 125 .ui-icon-arrow-1-se { background-position: -48px -32px; } 126 .ui-icon-arrow-1-s { background-position: -64px -32px; } 127 .ui-icon-arrow-1-sw { background-position: -80px -32px; } 128 .ui-icon-arrow-1-w { background-position: -96px -32px; } 129 .ui-icon-arrow-1-nw { background-position: -112px -32px; } 130 .ui-icon-arrow-2-n-s { background-position: -128px -32px; } 131 .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } 132 .ui-icon-arrow-2-e-w { background-position: -160px -32px; } 133 .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } 134 .ui-icon-arrowstop-1-n { background-position: -192px -32px; } 135 .ui-icon-arrowstop-1-e { background-position: -208px -32px; } 136 .ui-icon-arrowstop-1-s { background-position: -224px -32px; } 137 .ui-icon-arrowstop-1-w { background-position: -240px -32px; } 138 .ui-icon-arrowthick-1-n { background-position: 0 -48px; } 139 .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } 140 .ui-icon-arrowthick-1-e { background-position: -32px -48px; } 141 .ui-icon-arrowthick-1-se { background-position: -48px -48px; } 142 .ui-icon-arrowthick-1-s { background-position: -64px -48px; } 143 .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } 144 .ui-icon-arrowthick-1-w { background-position: -96px -48px; } 145 .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } 146 .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } 147 .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } 148 .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } 149 .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } 150 .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } 151 .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } 152 .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } 153 .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } 154 .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } 155 .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } 156 .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } 157 .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } 158 .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } 159 .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } 160 .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } 161 .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } 162 .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } 163 .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } 164 .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } 165 .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } 166 .ui-icon-arrow-4 { background-position: 0 -80px; } 167 .ui-icon-arrow-4-diag { background-position: -16px -80px; } 168 .ui-icon-extlink { background-position: -32px -80px; } 169 .ui-icon-newwin { background-position: -48px -80px; } 170 .ui-icon-refresh { background-position: -64px -80px; } 171 .ui-icon-shuffle { background-position: -80px -80px; } 172 .ui-icon-transfer-e-w { background-position: -96px -80px; } 173 .ui-icon-transferthick-e-w { background-position: -112px -80px; } 174 .ui-icon-folder-collapsed { background-position: 0 -96px; } 175 .ui-icon-folder-open { background-position: -16px -96px; } 176 .ui-icon-document { background-position: -32px -96px; } 177 .ui-icon-document-b { background-position: -48px -96px; } 178 .ui-icon-note { background-position: -64px -96px; } 179 .ui-icon-mail-closed { background-position: -80px -96px; } 180 .ui-icon-mail-open { background-position: -96px -96px; } 181 .ui-icon-suitcase { background-position: -112px -96px; } 182 .ui-icon-comment { background-position: -128px -96px; } 183 .ui-icon-person { background-position: -144px -96px; } 184 .ui-icon-print { background-position: -160px -96px; } 185 .ui-icon-trash { background-position: -176px -96px; } 186 .ui-icon-locked { background-position: -192px -96px; } 187 .ui-icon-unlocked { background-position: -208px -96px; } 188 .ui-icon-bookmark { background-position: -224px -96px; } 189 .ui-icon-tag { background-position: -240px -96px; } 190 .ui-icon-home { background-position: 0 -112px; } 191 .ui-icon-flag { background-position: -16px -112px; } 192 .ui-icon-calendar { background-position: -32px -112px; } 193 .ui-icon-cart { background-position: -48px -112px; } 194 .ui-icon-pencil { background-position: -64px -112px; } 195 .ui-icon-clock { background-position: -80px -112px; } 196 .ui-icon-disk { background-position: -96px -112px; } 197 .ui-icon-calculator { background-position: -112px -112px; } 198 .ui-icon-zoomin { background-position: -128px -112px; } 199 .ui-icon-zoomout { background-position: -144px -112px; } 200 .ui-icon-search { background-position: -160px -112px; } 201 .ui-icon-wrench { background-position: -176px -112px; } 202 .ui-icon-gear { background-position: -192px -112px; } 203 .ui-icon-heart { background-position: -208px -112px; } 204 .ui-icon-star { background-position: -224px -112px; } 205 .ui-icon-link { background-position: -240px -112px; } 206 .ui-icon-cancel { background-position: 0 -128px; } 207 .ui-icon-plus { background-position: -16px -128px; } 208 .ui-icon-plusthick { background-position: -32px -128px; } 209 .ui-icon-minus { background-position: -48px -128px; } 210 .ui-icon-minusthick { background-position: -64px -128px; } 211 .ui-icon-close { background-position: -80px -128px; } 212 .ui-icon-closethick { background-position: -96px -128px; } 213 .ui-icon-key { background-position: -112px -128px; } 214 .ui-icon-lightbulb { background-position: -128px -128px; } 215 .ui-icon-scissors { background-position: -144px -128px; } 216 .ui-icon-clipboard { background-position: -160px -128px; } 217 .ui-icon-copy { background-position: -176px -128px; } 218 .ui-icon-contact { background-position: -192px -128px; } 219 .ui-icon-image { background-position: -208px -128px; } 220 .ui-icon-video { background-position: -224px -128px; } 221 .ui-icon-script { background-position: -240px -128px; } 222 .ui-icon-alert { background-position: 0 -144px; } 223 .ui-icon-info { background-position: -16px -144px; } 224 .ui-icon-notice { background-position: -32px -144px; } 225 .ui-icon-help { background-position: -48px -144px; } 226 .ui-icon-check { background-position: -64px -144px; } 227 .ui-icon-bullet { background-position: -80px -144px; } 228 .ui-icon-radio-off { background-position: -96px -144px; } 229 .ui-icon-radio-on { background-position: -112px -144px; } 230 .ui-icon-pin-w { background-position: -128px -144px; } 231 .ui-icon-pin-s { background-position: -144px -144px; } 232 .ui-icon-play { background-position: 0 -160px; } 233 .ui-icon-pause { background-position: -16px -160px; } 234 .ui-icon-seek-next { background-position: -32px -160px; } 235 .ui-icon-seek-prev { background-position: -48px -160px; } 236 .ui-icon-seek-end { background-position: -64px -160px; } 237 .ui-icon-seek-start { background-position: -80px -160px; } 238 /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ 239 .ui-icon-seek-first { background-position: -80px -160px; } 240 .ui-icon-stop { background-position: -96px -160px; } 241 .ui-icon-eject { background-position: -112px -160px; } 242 .ui-icon-volume-off { background-position: -128px -160px; } 243 .ui-icon-volume-on { background-position: -144px -160px; } 244 .ui-icon-power { background-position: 0 -176px; } 245 .ui-icon-signal-diag { background-position: -16px -176px; } 246 .ui-icon-signal { background-position: -32px -176px; } 247 .ui-icon-battery-0 { background-position: -48px -176px; } 248 .ui-icon-battery-1 { background-position: -64px -176px; } 249 .ui-icon-battery-2 { background-position: -80px -176px; } 250 .ui-icon-battery-3 { background-position: -96px -176px; } 251 .ui-icon-circle-plus { background-position: 0 -192px; } 252 .ui-icon-circle-minus { background-position: -16px -192px; } 253 .ui-icon-circle-close { background-position: -32px -192px; } 254 .ui-icon-circle-triangle-e { background-position: -48px -192px; } 255 .ui-icon-circle-triangle-s { background-position: -64px -192px; } 256 .ui-icon-circle-triangle-w { background-position: -80px -192px; } 257 .ui-icon-circle-triangle-n { background-position: -96px -192px; } 258 .ui-icon-circle-arrow-e { background-position: -112px -192px; } 259 .ui-icon-circle-arrow-s { background-position: -128px -192px; } 260 .ui-icon-circle-arrow-w { background-position: -144px -192px; } 261 .ui-icon-circle-arrow-n { background-position: -160px -192px; } 262 .ui-icon-circle-zoomin { background-position: -176px -192px; } 263 .ui-icon-circle-zoomout { background-position: -192px -192px; } 264 .ui-icon-circle-check { background-position: -208px -192px; } 265 .ui-icon-circlesmall-plus { background-position: 0 -208px; } 266 .ui-icon-circlesmall-minus { background-position: -16px -208px; } 267 .ui-icon-circlesmall-close { background-position: -32px -208px; } 268 .ui-icon-squaresmall-plus { background-position: -48px -208px; } 269 .ui-icon-squaresmall-minus { background-position: -64px -208px; } 270 .ui-icon-squaresmall-close { background-position: -80px -208px; } 271 .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } 272 .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } 273 .ui-icon-grip-solid-vertical { background-position: -32px -224px; } 274 .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } 275 .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } 276 .ui-icon-grip-diagonal-se { background-position: -80px -224px; } 277 278 279 /* Misc visuals 280 ----------------------------------*/ 281 282 /* Corner radius */ 283 .ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; -khtml-border-top-left-radius: 4px; border-top-left-radius: 4px; } 284 .ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; -khtml-border-top-right-radius: 4px; border-top-right-radius: 4px; } 285 .ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; -khtml-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } 286 .ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; -khtml-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } 287 288 /* Overlays */ 289 .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } 290 .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -khtml-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* 291 * jQuery UI Progressbar 1.8.16 292 * 293 * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) 294 * Dual licensed under the MIT or GPL Version 2 licenses. 295 * http://jquery.org/license 296 * 297 * http://docs.jquery.com/UI/Progressbar#theming 298 */ 299 .ui-progressbar { height:2em; text-align: left; } 300 .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
1 body{background:#eee;font-family:Verdana, Helvetica, Arial, sans-serif;margin:0;padding:0} 2 .example{background:#FFF;width:650px;font-size:80%;border:1px #000 solid;margin:20px auto;padding:15px;position:relative;-moz-border-radius: 3px;-webkit-border-radius: 3px} 3 h3 {text-align:center} 4 5 .pbar .ui-progressbar-value {display:block !important} 6 .pbar {overflow: hidden} 7 .percent {position:relative;text-align: right;} 8 .elapsed {position:relative;text-align: right;}
看这路径,引入就好了