Pages

Monday, May 6, 2013

2

Small update (visual improvement) for my tabbed gadgets

I made my gadget tabifying widget back in 2011. Today I saw another implementation, and it had nice fade in effect. I remembered that I had used also jQuery in the tabifying widget, and that jQuery has nice functions for fading. So I decided to try and tweak it a little. The result can be seen on this blog: click on the tabs on right sidebar (for example, About me, Followers, Subscribe to) and notice the smooth transition. :)

(This won't work with nested tabs, but I don't recommend using them in the first place, because nested tabs can be confusing to user.)

If you have my tabbed gadgets hack installed, you can make the same changes. It is quite easy:

1. Open the tabifying gadget for editing. Make a backup of the working script before making changes.

2. Find line (near line 105):
  for(var i = 0; i<tabnav0_tabids.length; i++) {
3. after that add this line:
    if(tabnav0_tabids[i] == nimi) continue;
If you have multiple tab sets, and you have tabnav1_tabids instead of tabnav0_tabids, use tabnav1_tabids in the added line, etc.

4. Then find this block of code (near line 111):
  toshow = document.getElementById(tabnav3_id).style.display;
  document.getElementById(nimi).style.display=toshow;
  if(tabsIDs[nimi])
    document.getElementById(tabsIDs[nimi]).style.display = toshow;
5. Replace that block of code with this:
  $("#"+nimi).fadeIn(300);
  if(tabsIDs[nimi])
    $("#"+tabsIDs[nimi]).fadeIn(300);
6. Save the gadget.

If you want, you can adjust the fade in time, now 300 (milliseconds), I think 200 to 600 milliseconds is good range. Hope you like it! :)
[Hide comments] - [Show comments]
Click on a single comment to hide/show its text

2 comments:

Marcus said... [reply]

Please take a look on my blog how can I add this here on lyricsmat.

Pak wendi said... [reply]

assalamualaikum wr,wb
Ki nawe… saya Pak Wendi,tki di malaysia
mengucapkan banyak2 terima
kasih kepada ki.Nawe
atas dana ghaib yang
kemarin aki berikan alhamdulillah ternyata itu benar2 ada
dan berkat bantuan
ki nawe saya bisa
melunasi semua hutan2
orang tua saya yang ada di
BANK BRI dan bukan hanya
itu AKi NAWE alhamdulillah
sekarang saya sudah bisa
bermodal sedikit untuk
mencukupi kebutuhan
keluarga saya sehari2. itu
semua berkat bantuan KI NAWE sekali lagi
makasih banyak yah KI NAWE…
yang ingin merubah nasib
seperti saya hubungi KI NAWE di nomor
0852-1837-9259 dijamin
100% ada atau silahkan
buktikan sendiri PESUGIHAN TANPA TUMBAL

Post a Comment

Related Posts Plugin for WordPress, Blogger...
See the hack
for this dynamic
views icon: