User:Chronocelebi/common.js

function updateTime { var today = new Date; var h = today.getHours; var m = today.getMinutes; var s = today.getSeconds; m = checkTime(m); s = checkTime(s); $('#clock').text( h + ':' + m + ':' + s ); setTimeout(updateTime, 500); } function checkTime(i) { if (i < 10) { i = "0" + i;   } return i; }

$(document).ready( function {	$('#p-logo').prepend( $(' ').attr('id', 'clock') );	updateTime; } );