|
<!DOCTYPE html> |
|
<html> |
|
<head> |
|
<meta charset='utf-8'> |
|
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
|
<title>sophilabs/jquery-counter</title> |
|
|
|
<link href="../src/jquery.counter-analog.css" media="screen" rel="stylesheet" type="text/css" /> |
|
<link href="../src/jquery.counter-analog2.css" media="screen" rel="stylesheet" type="text/css" /> |
|
<link href="../src/jquery.counter-analog3.css" media="screen" rel="stylesheet" type="text/css" /> |
|
|
|
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script> |
|
<script src="../src/jquery.counter.js" type="text/javascript"></script> |
|
|
|
</head> |
|
<body style="background-color: #d77;"> |
|
<h1>Examples</h1> |
|
<p> |
|
<span class="counter counter-analog" data-direction="down">0:10</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog" data-direction="down">0:10</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
<p> |
|
<span class="counter counter-analog" data-direction="down" data-format="20.23:59:59">20.00:00:00</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog" data-direction="down" data-format="20.23:59:59">20.00:00:00</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
<p> |
|
<span class="counter counter-analog" data-direction="up" data-interval="1" data-format="9999" data-stop="2012">0</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog" data-direction="up" data-interval="1" data-format="9999" data-stop="2012">0</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
<p> |
|
<span class="counter counter-analog" data-direction="up" data-format="1 1 1 1 1 1 1 1" data-stop="0 0 1 0 0 0 0 0" data-interval="100">0</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog" data-direction="up" data-format="1 1 1 1 1 1 1 1" data-stop="0 0 1 0 0 0 0 0" data-interval="100">0</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
<h1>Style counter-analog2</h1> |
|
<p> |
|
<span class="counter counter-analog2" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100">0:00.0</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog2" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100">0:00.0</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
|
|
<h1>Style counter-analog3</h1> |
|
<p> |
|
<span class="counter counter-analog3" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100">0:00.0</span> |
|
</p> |
|
<pre> |
|
<span class="counter counter-analog3" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100">0:00.0</span> |
|
<script> |
|
$('.counter').counter({}); |
|
</script> |
|
</pre> |
|
|
|
<h1>Full Javascript Initialization</h1> |
|
<p> |
|
<span id="custom"></span> |
|
<pre> |
|
<span id="custom"></span> |
|
<script> |
|
$('#custom').addClass('counter-analog').counter({ |
|
initial: '0:00.0', |
|
direction: 'up', |
|
interval: '1', |
|
format: '9999', |
|
stop: '2012' |
|
}); |
|
</script> |
|
</pre> |
|
</p> |
|
<h1>Event counterStop</h1> |
|
<pre> |
|
<script> |
|
$('.counter').on('counterStop', function() { |
|
//code |
|
}); |
|
</script> |
|
</pre> |
|
<script> |
|
$('.counter').counter(); |
|
$('#custom').addClass('counter-analog').counter({ |
|
initial: '0:00.0', |
|
direction: 'up', |
|
interval: '1', |
|
format: '9999', |
|
stop: '2012' |
|
}); |
|
</script> |
|
</body> |
|
</html> |
|
|