Kodları lütfen aşağıdaki butonları kullanarak renklendirin. Örnek: <php> echo "Selam Dünya"; </php>
Yardım
karakter kaldı

link üzerine gelince değişen resim

arkadaşlar herkese hayırlı günler dilerim. Benim bir sorunum var şöyle sitem yilmazsanliog.com/tonyagundemi/
bu sitedeki manşet haberler kısmında ki rakamların üzerine geldiğimde resimlerinde otomatik olarak değişmesini istiyorum. Şu anki hali linke tıklayınca değişiyor ben ise üzerine geldiğimde değişmesini istiyorum. Bunu nasıl yapabilirim.


PHP dosya kodları
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9" />
<link href="css/css.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/fonksiyonlar.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/featuredcontentglider.js"></script>
<link rel="stylesheet" type="text/css" href="js/featuredcontentglider.css">

<script type="text/javascript">
featuredcontentglider.init({
gliderid: "canadaprovinces", //stil synyfy
contentclass: "glidecontent", //stil synyfy
togglerid: "p-select", // numaralaryn de?i?tirmesi için atanan id ady
remotecontent: "",
selected: 0, //seçilmeyen numarada varsayylan ilk bilgiyi göster
persiststate: false, //(true/false)?
speed: 200, // ekranda gösterilecek bilginin ekrana geli? hyzy
direction: "rightleft", //kullanylyacak özellikler: "updown", "downup", "leftright", ve "rightleft"
autorotate: true, //otomatik turlama
autorotateconfig: [5000, 10] //e?er autorotate açyksa, set [3saniye, tur sayysy 1 yazarsanyr bir kere turlar]
})
</script>
<script language="JavaScript">
function shows3(sayi,degisen)
{
for(var a=1; a<=sayi; a++)
{
baslikid='basak3'+a;
document.getElementById(baslikid).style.display = 'none';
resimid='resim4'+a;
document.getElementById(resimid).style.display = 'none';
}
baslikid='basak3'+degisen;
document.getElementById(baslikid).style.display = 'block';
resimid='resim4'+degisen;
document.getElementById(resimid).style.display = 'block';
}
</script>




<?php function bharf( $giris ) {
return strtoupper( strtr($giris,'ðüþýiöç', 'ÐÜÞIÝÖÇ') );
}
?>

<div style="overflow:hidden; margin-bottom:5px;">

<div style="width:485px; height:304px; overflow:hidden; float:left;">
<div class="manset_tk">
<div class="birinci_tk">
<div id="canadaprovinces" class="glidecontentwrapper">

<?
$sql_ana = mysql_query("select * from haberler WHERE yer='manset_haber' ORDER by id DESC LIMIT 0,15");
$ana = mysql_fetch_array($sql_ana);
$bas = substr(nl2br(strip_tags($ana["baslik"])),0,28);

?>

<? do { ?>
<div class="glidecontent"><a style="text-decoration:none" href="<? echo $ana["id"] ?>-<? echo "".$new_string = replace_rexx($ana['baslik']).""; ?>.html">
<div class="manset_text" style="cursor:pointer;">
<div style="margin:auto; cursor:pointer; margin-top:6; text-align:left; width:450;"><span class="manset_yazisi"><? echo bharf($ana["baslik"]); ?></span></div>
</div>
<img width="482" height="241" border="0" src="<? echo $ana["resim1"] ?>"></a></div>
<?
}
while ( $ana = mysql_fetch_array($sql_ana) );
?>

</div>

<div style="width:0; margin:auto; overflow:hidden; height:2px;"></div>
<div style=" height:27; margin:auto; text-align:left;">
<div id="p-select" class="glidecontenttoggler">

<a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">1</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">2</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">3</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">4</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">5</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">6</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">7</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">8</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">9</div></a><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">10</div><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">11</div><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">12</div><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">13</div><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">14</div><a href="#" style="text-decoration:none;" class="toc"><div style="margin:2px;">15</div></a>&nbsp;
</div>
</div>



</div></div>


</div>

<div style="width:201px; margin-left:5px; height:304px; overflow:hidden; float:left;">


<div class="man_2">
<?
$say=0;
$sql="select * from haberler where yer='manset_yan' ORDER by id DESC LIMIT 0,5";
$sonuc=mysql_query($sql);
while ($row=mysql_fetch_array($sonuc))
{
$ozet = substr(nl2br(stripslashes($row["haber"])),0,95);

$say++;
?>
<a href="<? echo $row[id]; ?>-<? echo "".$new_string = replace_rexx($row['baslik']).""; ?>.html">
<div id="resim4<? echo $say; ?>" <? if ($say>1) { echo "style=display:none"; } ?> style="cursor:pointer;">
<div style="width:201px; height:131px; overflow:hidden;"><img src="<? echo $row[resim1]; ?>" width="199" height="121" style="border:1px solid #000000;" /></div>
<div style="width:201px; height:81px; overflow:hidden; background:url(images/manset_yani_icerik_bg.png) no-repeat;">
<div style="width:201px; height:73px; overflow:hidden;">
<div style="width:201px; height:auto; margin-left:5px; margin-right:5px;" id="BASLIK"><span class="tahoma" style="font-size:12px; font-weight:bold;"><font color="#C01111"><? echo $row[baslik] ?></font></span></div>
<div class="cok_okunan_bosluk"></div>
<div style="width:201px; height:50; margin-left:5px; margin-right:5px; overflow:hidden;" id="ÝCERÝK"><span style="line-height:16px;" class="tahoma"><font color="#2A2A2A"><? echo $row[spot] ?></font></span></div>
</div>
</div>
</div></a>
<? } ?>
<?
$bu=0;
$sql="select * from haberler where yer='manset_yan' ORDER by id DESC LIMIT 0,5";
$sonuc=mysql_query($sql);
while ($row=mysql_fetch_array($sonuc))
{
$kisabaslik2 = substr(nl2br(stripslashes($row["haber_baslik"])),0,65);
$bu++;
?>
<div id="BASLIKLAR" style="width:201px; height:24px; background:url(images/manset_yan_cizgili_bg.png) no-repeat;">
<div style="margin-left:17px; height:18px; width:181px; overflow:hidden;"><font style="line-height:15px; " class="tahoma"><a href="<? echo $row[id]; ?>-<? echo "".$new_string = replace_rexx($row['baslik']).""; ?>.html" target="_self" onmouseover="shows3(<? echo $say; ?>,<? echo $bu; ?>)"><span class="tahoma_baslik_k"><font color="#2A2A2A"><? echo $row[baslik] ?></span></a></font></div>
</div>
<?
+0
-1
Cevaba KatılıyorumKatılmıyorum
Cevap Yaz Yorum Yaz Arşivime Ekle Takip Et

Cevaplar

  • labis adlı üyenin fotoğrafı
    11 yıl önce yazılmış
    1 cevap - 1 soru
    Arkadaşlar bir cevap yazacak kişi yokmu..Benim için çok önemli
    • Kesali adlı üyenin fotoğrafı Kesali
      Bütün kodları buraya yazmak yerine sadece ilgili bölümü eklesen çok daha kolay anlaşılacak.
      11 yıl önce yazılmış
  • 1
    yusuef adlı üyenin fotoğrafı
    11 yıl önce yazılmış
    32 cevap - 0 soru
    Arkadaşım burada yazdığın kodları anlamak çok zor.Ben sana mantığını anlatayım.

     <div class="links link1"  onmouseover="resimHover(1);">1</div>
     <div class="links link2"  onmouseover="resimHover(2);">2</div>
     <div class="links link3"  onmouseover="resimHover(3);">3</div>
     <div class="links link4"  onmouseover="resimHover(4);">4</div>
     <div class="links link5"  onmouseover="resimHover(5);">5</div>
    


    şeklinde manşet altında linklerin olduğunu varsayarsak

    function resimHover(deger)
    {
        for (var i = 0; i < mansetSayisi; i++)
        {
          $('.link'+i).css("display","none");
        }
        $('.link'+deger).css("display","true");
    }
    


    şeklinde resimHover fonksiyonuna ilgili linkin id si gelince tüm linkleri display:none; yapacaksın ve gelen id ye ait linki display:block; yada display:true; yapacaksın. Mantık hepsini gizle işine yarayanı göster.