For those who have lots of information in one page, but you dont want your user to scroll a….ll the way down (yeah it’s quite frustating to find a chunk of information di halaman yang panjang gila). Solusi ini bisa jadi alternatif gampang nan-efektif. Most effectifely on page content such as FAQ dan semacamnya.
Toolnya cuman simple css dan JavaScript ( kelemahan : kalo browsernya mati-in javascript ya udah, usernya bakalan scroll tu halaman panjang gila).
OK! here is the code 😀
first of all, the css :
[css]
.hidden { display: none; }
.unhidden { display: block; }
[/css]
second thing is the Javascript :
[php]
[/php]
Dua-duanya diletakkan sebelum closing tag [php][/php]
That’s all about it folks 😀 sekarang udah tinggal diapply aja ke contentnya. I’ll use FAQ as the content example.
example:
[html]
Q : Mengapa bumi itu bulat?
A : Jawaban
Karena eh karena, berjudi itu dilarang,
merokok itu merusak,
minum bir itu memabukkan
merokok itu merusak,
minum bir itu memabukkan
[/html]
and there you go! you have a nice, clean FAQ page 😀
sumber pencerahan : dari sini thx mate!