17.11.11

Expand Collapse use DHTML Script

Diantara sekian banyak trik menyembunyikan sesuatu, ada spoiler teknik, trik jQuery plugin, dsb :P Sekarang Beben Koben si bloglang anu ganteng kalem tea akan berbagi kode sederhana seperti Collapse / Expand :)
Seperti ini contohnya sob
I N T R O - C O N T E N T - H E R E
[Read More...]
Berikut scriptnya
<div>

I N T R O - C O N T E N T - H E R E

<div align="right" id="expand_button"><span style="color:#000;cursor:pointer;font-weight:bold;" onmouseover="this.style.color='#A00';this.style.textDecoration='line-through';" onmouseout="this.style.color='#333';this.style.textDecoration='none';" onclick="document.getElementById('collapsed_content').style.display='block'; document.getElementById('expand_button').style.display='none';">[Read More...]</span>
</div>

<div id="collapsed_content" style="display:none;">

C O L L A P S E D - C O N T E N T - H E R E

<div align="right" id="expand_button"><span style="color:#000;cursor:pointer;font-weight:bold;" onmouseover="this.style.color='#A00';this.style.textDecoration='underline';" onmouseout="this.style.color='#333';this.style.textDecoration='none';" onclick="document.getElementById('collapsed_content').style.display='none'; document.getElementById('expand_button').style.display='block';">[Close Lagi...]</span>
</div>

</div>

</div>
Selamat berkreasi...