renovations
This commit is contained in:
parent
0eec1aaccb
commit
c018a2db03
56 changed files with 459 additions and 594 deletions
|
@ -8,15 +8,15 @@ function Clock(options) {
|
|||
|
||||
var hours = date.getHours();
|
||||
if (hours < 10) hours = '0' + hours;
|
||||
$('.hour', elem).html(hours);
|
||||
elem.querySelector('.hour').innerHTML = hours;
|
||||
|
||||
var min = date.getMinutes();
|
||||
if (min < 10) min = '0' + min;
|
||||
$('.min', elem).html(min);
|
||||
elem.querySelector('.min').innerHTML = min;
|
||||
|
||||
var sec = date.getSeconds();
|
||||
if (sec < 10) sec = '0' + sec;
|
||||
$('.sec', elem).html(sec);
|
||||
elem.querySelector('.sec').innerHTML = sec;
|
||||
}
|
||||
|
||||
this.stop = function() {
|
||||
|
@ -26,6 +26,6 @@ function Clock(options) {
|
|||
this.start = function() {
|
||||
render();
|
||||
timer = setInterval(render, 1000);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Часики</title>
|
||||
<script src="http://code.jquery.com/jquery.min.js"></script>
|
||||
<script src="clock.js"></script>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
|
@ -20,7 +19,7 @@
|
|||
<script>
|
||||
|
||||
var pageClock = new Clock({
|
||||
elem: $('#clock')
|
||||
elem: document.getElementById('clock')
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue