WorknHardr
asked on
MVC 5 Razor Values and Jquery Progress Bar?
I've read the docs and the tried examples and still cannot get MVC 5 Razor variables to work with Jquery Progress bar. This progress bar is used for a charity drive to show the Goal, Raised, Progress (goal-raised) and percentage in text. This very typical behavior I know. Help...
Here's what I have so far...
View
_________________________________________________________________________________________
||||||||||||||| 40% ||||||||||| |
-----------------------------------------------------------------------------------------
Here's what I have so far...
View
known values:
alert(@Model.Raised); // 750
alert(@Model.Goal); // 100000
alert(@Model.Progress); // 99250
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css"></script>
<script src="http://jqueryui.com/jquery-wp-content/themes/jqueryui.com/style.css"></script>
<script type="text/javascript">
//basic jquery example which works...
$(function () {
$("#progressbar > .ui-progressbar-value").animate({
width: "77%",
value: "11"
}, 600);
});
</script>
<style>
.progress-bar
{
height: 20px;
border: 1px solid #ddd;
border-radius: 5px;
overflow: hidden;
display: inline-block;
margin: 0px 10px 5px 5px;
vertical-align: top;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER