Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
807 B

5 years ago
  1. // Interactiveness now
  2. (function() {
  3. var clock = document.querySelector('digiclock');
  4. // But there is a little problem
  5. // we need to pad 0-9 with an extra
  6. // 0 on the left for hours, seconds, minutes
  7. var pad = function(x) {
  8. return x < 10 ? '0'+x : x;
  9. };
  10. var ticktock = function() {
  11. var d = new Date();
  12. var h = pad( d.getHours() );
  13. var m = pad( d.getMinutes() );
  14. var s = pad( d.getSeconds() );
  15. var current_time = [h,m,s].join(':');
  16. if (clock) {
  17. clock.innerHTML = current_time;
  18. }
  19. };
  20. ticktock();
  21. // Calling ticktock() every 1 second
  22. setInterval(ticktock, 1000);
  23. }());
  24. /* ---------- Notifications ---------- */
  25. $('.noty').click(function(e){
  26. e.preventDefault();
  27. var options = $.parseJSON($(this).attr('data-noty-options'));
  28. noty(options);
  29. });