[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4770: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3884)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4772: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3884)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4773: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3884)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4774: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3884)
 Forum eduweb.pl • Wyświetl temat - Jak uruchomić zegar?
Z uwagi na dużą liczbę wpisów stworzonych bez wątpienia wyłącznie w celu pozycjonowania stron na określone frazy, dodaliśmy do wszystkich linków (w postach i podpisach) atrybut rel="nofollow". Z tego względu wszystkie dodane linki straciły swoją moc pozycjonerską. Forum jest dla Was, dlatego prosimy o zamieszczanie wyłącznie "prawdziwych" tematów i odpowiedzi.

Jak uruchomić zegar?

Forum dla osób rozpoczynających przygodę z webdesignem
  • Wiadomości
Offline
Awatar użytkownika

peggibe

  • Posty: 61
  • Rejestracja: 19 sty 2013, o 20:26

Jak uruchomić zegar?

Post11 paź 2018, o 15:57

...a moją idolką jest Peggy
Offline
Awatar użytkownika

peggibe

  • Posty: 61
  • Rejestracja: 19 sty 2013, o 20:26

Re: Jak uruchomić zegar?

Post11 paź 2018, o 15:57

(function(e){function t(e,t){return e.toFixed(t.decimals)}e.fn.countTo=function(t){t=t||{};return e(this).each(function(){function l(){a+=i;u++;c(a);if(typeof n.onUpdate=="function"){n.onUpdate.call(s,a)}if(u>=r){o.removeData("countTo");clearInterval(f.interval);a=n.to;if(typeof n.onComplete=="function"){n.onComplete.call(s,a)}}}function c(e){var t=n.formatter.call(s,e,n);o.text(t)}var n=e.extend({},e.fn.countTo.defaults,{from:e(this).data("from"),to:e(this).data("to"),speed:e(this).data("speed"),refreshInterval:e(this).data("refresh-interval"),decimals:e(this).data("decimals")},t);var r=Math.ceil(n.speed/n.refreshInterval),i=(n.to-n.from)/r;var s=this,o=e(this),u=0,a=n.from,f=o.data("countTo")||{};o.data("countTo",f);if(f.interval){clearInterval(f.interval)}f.interval=setInterval(l,n.refreshInterval);c(a)})};e.fn.countTo.defaults={from:0,to:0,speed:1e3,refreshInterval:100,decimals:0,formatter:t,onUpdate:null,onComplete:null}})(jQuery)
...a moją idolką jest Peggy
Offline
Awatar użytkownika

peggibe

  • Posty: 61
  • Rejestracja: 19 sty 2013, o 20:26

Re: Jak uruchomić zegar?

Post11 paź 2018, o 15:58

// Countdown Init Init
$(document).ready(function(){

var countdown = $(".countdown");
var data_finish_date = countdown.attr("data-finish-date");
var data_UTC = countdown.attr("data-UTC");
var data_finish_message = countdown.attr("data-finish-message");

countdown.downCount({
date: data_finish_date,
offset: data_UTC
}, function(){
alert(data_finish_message);
});

});


/**
* downCount: Simple Countdown clock with offset
* Author: Sonny T. <hi@sonnyt.com>, sonnyt.com
*/

(function ($) {

$.fn.downCount = function (options, callback) {
var settings = $.extend({
date: null,
offset: null
}, options);

// Throw error if date is not set
if (!settings.date) {
$.error('Date is not defined.');
}

// Throw error if date is set incorectly
if (!Date.parse(settings.date)) {
$.error('Incorrect date format, it should look like this, 12/24/2012 12:00:00.');
}

// Save container
var container = this;

/**
* Change client's local date to match offset timezone
* @return {Object} Fixed Date object.
*/
var currentDate = function () {
// get client's current date
var date = new Date();

// turn date to utc
var utc = date.getTime() + (date.getTimezoneOffset() * 60000);

// set new Date object
var new_date = new Date(utc + (3600000*settings.offset))

return new_date;
};

/**
* Main downCount function that calculates everything
*/
function countdown () {
var target_date = new Date(settings.date), // set target date
current_date = currentDate(); // get fixed current date

// difference of dates
var difference = target_date - current_date;

// if difference is negative than it's pass the target date
if (difference < 0) {
// stop timer
clearInterval(interval);

if (callback && typeof callback === 'function') callback();

return;
}

// basic math variables
var _second = 1000,
_minute = _second * 60,
_hour = _minute * 60,
_day = _hour * 24;

// calculate dates
var days = Math.floor(difference / _day),
hours = Math.floor((difference % _day) / _hour),
minutes = Math.floor((difference % _hour) / _minute),
seconds = Math.floor((difference % _minute) / _second);

// fix dates so that it will show two digets
days = (String(days).length >= 2) ? days : '0' + days;
hours = (String(hours).length >= 2) ? hours : '0' + hours;
minutes = (String(minutes).length >= 2) ? minutes : '0' + minutes;
seconds = (String(seconds).length >= 2) ? seconds : '0' + seconds;

// based on the date change the refrence wording
var ref_days = (days === 1) ? 'day' : 'days',
ref_hours = (hours === 1) ? 'hour' : 'hours',
ref_minutes = (minutes === 1) ? 'minute' : 'minutes',
ref_seconds = (seconds === 1) ? 'second' : 'seconds';

// set to DOM
container.find('.days').text(days);
container.find('.hours').text(hours);
container.find('.minutes').text(minutes);
container.find('.seconds').text(seconds);

container.find('.days_ref').text(ref_days);
container.find('.hours_ref').text(ref_hours);
container.find('.minutes_ref').text(ref_minutes);
container.find('.seconds_ref').text(ref_seconds);
};

// start
var interval = setInterval(countdown, 300);
};

})(jQuery);
...a moją idolką jest Peggy
Offline
Awatar użytkownika

peggibe

  • Posty: 61
  • Rejestracja: 19 sty 2013, o 20:26

Re: Jak uruchomić zegar?

Post11 paź 2018, o 15:58

Z góry dzięki za pomoc
...a moją idolką jest Peggy
Offline
Awatar użytkownika

peggibe

  • Posty: 61
  • Rejestracja: 19 sty 2013, o 20:26

Re: Jak uruchomić zegar?

Post13 paź 2018, o 09:26

w razie czego mogę przesłać na maila pliki strony jakby te nie wystarczyły.
...a moją idolką jest Peggy

Wróć do Początkujący Webmaster

Kto jest online

Użytkownicy przeglądający to forum: Obecnie na forum nie ma żadnego zarejestrowanego użytkownika i 0 gości

cron