File size: 3,905 Bytes
3f268e5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
<!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>
|