Pro_Lamer4e
Registered
има ли начин този код
автоматично на всеки 5 секудни да се обновява и когасто се натисне next да покаже друг резултат
ето и javascript-а който ползвам
Код:
<div class="main_title_right_but">
<div class="widget">
<span class="prev_test2">#</span>
<span class="next_test2">#</span>
</div>
<span class="main_title_right_but_r">Testimonials</span>
</div>
<div class="clearboth"></div>
<?php $query="SELECT * FROM testimonials ORDER BY id DESC LIMIT 3";
$result = mysql_query($query);
$row=mysql_fetch_array($result);
$name=$row[name];
$comment=$row[comment];
$city=$row[city];
?>
<div class="testimon">
<ul>
<li>
<p><?php print $comment ?></p>
<strong><?php print $name ?>, <?php print $city ?></strong>
</li>
<li>
<p>Praesent volutpat, ligula ut scelerisque semper, risus justo feugiat tortor</p>
<strong>Ivan Sidorov, Russia</strong>
</li>
</ul>
</div>
</div>
<div class="clearboth"></div>
автоматично на всеки 5 секудни да се обновява и когасто се натисне next да покаже друг резултат
ето и javascript-а който ползвам
Код:
Testimonials slider s
$('.testimon ul').cycle({
prev: '.prev_test2',
next: '.next_test2',
fx: 'fade',
cleartype: true,
cleartypeNoBg: true,
speed: 800,
timeout: 5000
});