Tiklayinca acilan-kapanan alan
2
●93
- 27-04-2010, 00:04:04jquery kullanmadan da basit bir şey yapabilirsin. örnek olarak ben ufak bir şey yazdım. javascript, html ve css dillerini kullanıyor. nasıl yapıldığını görmen, mantığını anlaman için bu kodu bir sayfaya kaydedip, çalıştırman yeterli olacaktır.
<head> <meta http-equiv="content-type" type="text/html; charset=windows-1254;" /> <script type="text/javascript"> function kapa() { document.getElementById("kutu").style.display="none"; document.getElementById("kutu_kapa").style.display="none"; document.getElementById("kutu_ac").style.display="block"; } function ac() { document.getElementById("kutu").style.display="block"; document.getElementById("kutu_kapa").style.display="block"; document.getElementById("kutu_ac").style.display="none"; } </script> </head> <style type="text/css"> body{font-size:13px; font-family:verdana;} #kutu_ac{background-color:#333; color:white; width:300px; height:20px;} #kutu_kapa{background-color:#333; color:white; width:300px; height:20px;} #kutu{background-color:#e6e6e6; width:300px; height:150px;} </style> <div id="kutu_ac" onclick="ac();" style="display:none;">kutuyu aç</div> <div id="kutu_kapa" onclick="kapa();">kutuyu kapa</div> <div id="kutu"> burası kutumuz </div>