extranet/www/js/combine/script_giant.js
2011-04-14 14:55:35 +00:00

8 lines
1.1 KiB
JavaScript

(function($){$.fn.reportprogress=function(val,maxVal){var max=100;if(maxVal)
max=maxVal;return this.each(function(){var div=$(this);var innerdiv=div.find(".progress");if(innerdiv.length!=1){innerdiv=$("<div class='progress'></div>");div.append("<div class='text'> </div>");$("<span class='text'> </span>").css("width",div.width()).appendTo(innerdiv);div.append(innerdiv);}
var width=Math.round(val/max*100);innerdiv.css("width",width+"%");div.find(".text").html(width+" %");});};})(jQuery);
var pct=0;var handle=0;function update(){$("#progressbar").reportprogress(++pct);if(pct==500)
pct=0;}
$(document).ready(function(){$('.idpr').live('click',function(){var n=$(this).attr('id');$('#'+n).css('display','none');if($('#p'+n).css('display')=='none'){$('#p'+n).css('display','block');}else{$('#p'+n).css('display','none');}});$('.GiantTooltip').each(function()
{$(this).qtip({content:$(this).attr('alt'),style:{width:300,name:'cream'},hide:{when:'mouseout',fixed:true},position:{corner:{target:'bottomMiddle',tooltip:'topMiddle'}}});});$("#run").click(function(){handle=setInterval("update()",400);});});