Félix Marty
add dana
3f268e5
raw
history blame
3.91 kB
<!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>
&lt;span class="counter counter-analog" data-direction="down"&gt;0:10&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</pre>
<p>
<span class="counter counter-analog" data-direction="down" data-format="20.23:59:59">20.00:00:00</span>
</p>
<pre>
&lt;span class="counter counter-analog" data-direction="down" data-format="20.23:59:59"&gt;20.00:00:00&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</pre>
<p>
<span class="counter counter-analog" data-direction="up" data-interval="1" data-format="9999" data-stop="2012">0</span>
</p>
<pre>
&lt;span class="counter counter-analog" data-direction="up" data-interval="1" data-format="9999" data-stop="2012"&gt;0&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</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>
&lt;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"&gt;0&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</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>
&lt;span class="counter counter-analog2" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100"&gt;0:00.0&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</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>
&lt;span class="counter counter-analog3" data-direction="up" data-format="23:59:59.9" data-stop="00:00:10.0" data-interval="100"&gt;0:00.0&lt;/span&gt;
&lt;script&gt;
$('.counter').counter({});
&lt;/script&gt;
</pre>
<h1>Full Javascript Initialization</h1>
<p>
<span id="custom"></span>
<pre>
&lt;span id="custom"&gt;&lt;/span&gt;
&lt;script&gt;
$('#custom').addClass('counter-analog').counter({
initial: '0:00.0',
direction: 'up',
interval: '1',
format: '9999',
stop: '2012'
});
&lt;/script&gt;
</pre>
</p>
<h1>Event counterStop</h1>
<pre>
&lt;script&gt;
$('.counter').on('counterStop', function() {
//code
});
&lt;/script&gt;
</pre>
<script>
$('.counter').counter();
$('#custom').addClass('counter-analog').counter({
initial: '0:00.0',
direction: 'up',
interval: '1',
format: '9999',
stop: '2012'
});
</script>
</body>
</html>