.progress_bar { background-image: url("inc/img/progcob.jpg"); height:20px; width: 150px; } .progress { margin-top: 10px; width : 150px; border :solid 1px black; } #Progressbarval { font-family: Arial; font-size: 14px; font-weight: 900; font-style: italic; display: none; }
function SetProgress() { var statuscount = $("*[id$=hdnchkstatus]").val(); var statustotal = $("*[id$=hdnchktotal]").val(); progress = 0, progress = statuscount / statustotal * 100; $('.progress_bar').css('width', progress + '%'); if (progress != 100) { $('#Progressbarval').html((Math.round(progress)) + '%'); } else { $('#Progressbarval').html((Math.round(progress)) + '% ! Completed').css("color", "green"); } $('.progress').hover( function () { $('#Progressbarval').show("slow"); }, function () { $('#Progressbarval').hide("slow"); } ); }
<div class="progress"> <div class="progress_bar"></div> `div to display progress bar </div> <label id="Progressbarval"> `to display progress %` </label>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)