Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
//връща час:минута:секунда към настоящия момент
echo date('H:i:s');
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
/**
* Тази функция взима резултата от изпълнението
* на date.php и го показва в елемента с id currentTime
*/
function displayTime(){
$('#currentTime').load('date.php')
}
$(function(){
//Първоначално извикваме функцията сами
displayTime();
//Функцията displayTime ще бъде изпълнявана на всеки 5 секунди
setInterval(displayTime, 5000);
});
</script>
<div id="currentTime"></div>
<script src="http://code.jquery.com/jquery-latest.min.js"
type="text/javascript"></script>
....
<div id="result"></div>
....
<div id="container">tuk infoto koeto se generira s php script za da e dinamichno</div>
$('#result').load('test.php #container');
<script>
setTimeout(function(){
//ako ima div id container izchezva sled 5 secundi
if ($('#container').length > 0) {
$('#container').fadeOut();
}
}, 5000);
$(function(){
if($('#container').lenght < 0 {
$('#result').load('test.php #container2');
$('#container2').fadeIn();
});
</script>