Home » » cara membuat show / hide comments

cara membuat show / hide comments

kali ini, sayya akand membahaz tentang "bagaimana cara membuad show / hide comments".
itu loch.. yg kalo di klik bisa keluar, truz kalo di klik lagi bisa nutup. (hehe..)

example:

show hide comments blog

*maaf kalau gambarnya tidak jelaz.

langkah pertama, centang EXPAND TEMPLATE WIDGET, kemudian cari kode ]]></b:skin>, truz letakkan kode di bawah ini tepat di atasnya:

.commenthidden {display:none}
.commentshown {display:inline}

setelah itu, cari kode </head>, letakkan kode di bawah tepat di atasnya:

<script type='text/Javascript'>
function togglecomments (postid){
var whichpost = document.getElementById(postid);
if (whichpost.className=="commentshown"){
whichpost.className="commenthidden";
}
else{
whichpost.className="commentshown";
}
}
</script>

truz, cari lagi kode yg bernama <dl id='comments-block'>.
jika sudah ketemu, hapuzlah kode tersebud dan ganti dengan yg ini:

<a aiotitle='click to expand'
href='javascript:togglecomments
("comments-block")'
rel='nofollow'><strong>Show or Hide Comments</strong></a>
<dl class='commenthidden'
id='comments-block'>

*untuk tulisand Show or Hide Comments bisa di ganti sesuka hati. angel

selesaii suddah.. selamad mencoba. semoga berhasil. good luck! ok!
Share this article :

+ komentar + 33 komentar

Thursday, January 14, 2010 4:21:00 PM

Wah.....oke jg tu kayaknya...apalagi bagi yang komentnya setumpuk, tentu sangat bermanfaat...numpang save dulu, lain kali pengen coba.

Thursday, January 14, 2010 4:28:00 PM

yapz. dipersilahkand untug mbag osii. :h:

Thursday, January 14, 2010 5:00:00 PM

Wah, langsung aku praktekin deh zrond, eh, mugo2 lulus dgn biji apik yo :e:

Thursday, January 14, 2010 5:05:00 PM

thanks tipsnya bro, salam

Thursday, January 14, 2010 6:44:00 PM

okE soB triknya, thanks

Thursday, January 14, 2010 7:15:00 PM

salam sobat
trims sudah dberitahu caranya
saya akan mencobanya ya,,

Thursday, January 14, 2010 10:34:00 PM

wah menarik ini,,,
coba ah,,,
nice inpoh gan :D

Thursday, January 14, 2010 10:51:00 PM

sudah saia praktek kan dan hasilnya succesfull tanpa hambatan :D

Friday, January 15, 2010 7:23:00 AM

ooh,, makanya banyak orang yang pake ya..?

Friday, January 15, 2010 9:49:00 AM

tempat gw kode yg dl (id='comments-block') koq gak ada ya sam...padahal udah pake control F

Friday, January 15, 2010 12:20:00 PM

mantab nih... boleh dicoba...
biar gag kepanjangan kek punya ina hihihihi...

Friday, January 15, 2010 2:53:00 PM

Ouwh,begicu yah caranya,,,,
Makasi eah :l:

Friday, January 15, 2010 3:59:00 PM

@ bayu lebond, udah di centang lum
expand template widget nya? :g:

Friday, January 15, 2010 4:29:00 PM

wah ijin nyimak...
di WP ada pulgins kaya gini g ya.. :a:

Friday, January 15, 2010 4:32:00 PM

haha.. ada paling.
cari aja.
kalo ketemu, alon2 ponorogo bisa
dibawa pulang ke rumah. :f:

Friday, January 15, 2010 6:27:00 PM

Wah2 keren bgt tutorialnya, mantep bgt buat yg blognya punya comment bejibun bnyknya....

Friday, January 15, 2010 10:37:00 PM

wah ni khusus bagi blog yg komen nya ramai kayak pasar, mantab!

Saturday, January 16, 2010 9:30:00 AM

oke sip.. gue terapkan.....
:D

Saturday, January 16, 2010 9:38:00 AM

tapi gue kagak ketemu yang kode <dl id='comments-block'>.

jadi enggk bisa sob.. bingung

Saturday, January 16, 2010 2:29:00 PM

wis enek enek ae tip2 mu wi....

Saturday, January 16, 2010 5:13:00 PM

@ ahmad ramadani, paling lum di centang maz expand template widget nya.. :h:
coba lagi aj..

Saturday, January 16, 2010 5:32:00 PM

udah belum yah..?? kayaknya udah deh...
Tapi mungkin gue lupa kali yah..

Saturday, January 16, 2010 7:39:00 PM

mana nih update terbarunya? hehehehe


MAU DOWNLOAD FLIM RIN SAKURAGI? KLIK DISINI

Sunday, January 17, 2010 12:19:00 PM

woooo.. ndi? ndi? ndi? kok seng muncul malah anu.. :g:
wkwkwk

Monday, January 18, 2010 1:41:00 PM

makasih sobat

Monday, January 18, 2010 7:03:00 PM

sulap!!! postingane ilang

Monday, January 18, 2010 7:19:00 PM

huzz.. malah ngece!
UNDER MAINTENANCE kieh!
:f: wkwkwk

Tuesday, January 19, 2010 10:41:00 AM

kok post nya nggak ada ya??, apa kena hide juga, hehehee

Tuesday, January 19, 2010 10:43:00 AM

halllooo......postingannya hilang mas.

Monday, February 01, 2010 11:06:00 PM

ok sob blog q juga dah tak pasang

Tuesday, February 02, 2010 10:10:00 PM

yahaii.. :d:

Wednesday, September 08, 2010 2:09:00 PM

ikutan ahh....

Wednesday, August 03, 2011 6:55:00 PM

nggak berhasil barusan saya coba

Post a Comment

Silahkan berkomentar dengan baik, sopan, bijak dan membangun demi kepentingan bersama.

 
Support : My personal blog - Yusron Krista
Copyright © 2011. Leciku - Portal Berita Anak Muda - All Rights Reserved
Proudly powered by Blogger