Kod
<script type="text/javascript">
$(document).ready(function() {
$('.slideshow').cycle({
fx: 'fade', timeout: '3000', speed: '900' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
$("ul#bookmarks li a").click(function()
{
$("ul#bookmarks .active").removeClass("active");
$(this).parent().addClass("active");
var element_index = $("#bookmarks a").index(this);
$("#content div:visible").hide();
$("#content div").eq(element_index).show();
return false;
});
$("ul#bookmarks2 li a").click(function()
{
$("ul#bookmarks2 .active").removeClass("active");
$(this).parent().addClass("active");
var element_index = $("#bookmarks2 a").index(this);
$("#content div:visible").hide();
$("#content div").eq(element_index).show();
return false;
});
});
</script>
$(document).ready(function() {
$('.slideshow').cycle({
fx: 'fade', timeout: '3000', speed: '900' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
});
$("ul#bookmarks li a").click(function()
{
$("ul#bookmarks .active").removeClass("active");
$(this).parent().addClass("active");
var element_index = $("#bookmarks a").index(this);
$("#content div:visible").hide();
$("#content div").eq(element_index).show();
return false;
});
$("ul#bookmarks2 li a").click(function()
{
$("ul#bookmarks2 .active").removeClass("active");
$(this).parent().addClass("active");
var element_index = $("#bookmarks2 a").index(this);
$("#content div:visible").hide();
$("#content div").eq(element_index).show();
return false;
});
});
</script>
Oraz kod w PHP:
<div class="slideshow"> <?php echo "<div class='promo2'> <div style='width: 162px; float: left;'> <a href='pl/$id1/$nazwa1/'><img src='$zdjecie1' /></a> </div> <div class='promot'><a href='pl/$id1/$nazwa1/'><b>$nazwa1</b></a> <br/>$typ21 <p style='min-height: 50px;'> $krotki1 ...</p> szczegóły oferty: <br/><b>Cena: $cenaod1 zł / $cenado1 zł</b> </div> <div class='linkipr'> <p class='active'><a href='#'><b>$nazwa1</b></a></p>"; echo " <p><a href='#'><b>$nazwa2</b></a></p> // tutaj po kliknięciu w link "; echo " <p><a href='#'><b>$nazwa3</b></a></p> "; echo " </div> </div>"; ?> </div>
Oba skrypty są odpowiedzialne za pokaz slajdów. Jak zrobić, żeby po kliknięciu w link
Kod
<p><a href='#'><b>$nazwa2</b></a></p>
wczytywał się ten slajd i dalej szło odtwarzanie od tego slajdu.