Сообщение от imedia
|
var percent_func(percent)=function {
|
<!DOCTYPE HTML>
<html>
<head>
<title>Untitled</title>
<meta charset="utf-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script>
$(function ()
{ var percent_func = function(percent, time) {
$('#percent').prop({numberValue: percent}).animate({numberValue: 100}, {
duration: time,
easing: 'linear',
step: function(a, b) {
$(this).text((b.now|0) + ' %');
}
})}
percent_func(0, 2000);
})
</script>
</head>
<body>
<h1 id="percent">0%</h1>
</body>
</html>