Pages

Monday, May 6, 2013

6

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

6 comments:

Mixxerly said... [reply]

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

Unknown said... [reply]

Thanks for the amazing content.
We are a professional body massage service providers for men and women that provides all categories of massage services like deep tissue massage,top Balinese massage, Swedish massage, oil massage , tarntric , prostate, sports massage, trigger point massage, shiatsu massage, Thai massage services, aromatherapy massage,Nuru Massage, Full Body Massage etc.

Angel Body Spa services

Unknown said... [reply]

Use this diet hack to drop 2 lb of fat in just 8 hours

Well over 160k men and women are losing weight with a easy and SECRET "liquids hack" to drop 2 lbs each night in their sleep.

It is painless and works on anybody.

This is how you can do it yourself:

1) Take a glass and fill it up with water half glass

2) And now do this strange hack

so you'll be 2 lbs thinner as soon as tomorrow!

laasyawacker said... [reply]

Titanium Rimless Glasses - Classic Brands - Tioga Brands
T-shirts, stickers, clipart, stickers, clipart, clipart, and micro touch titanium trim more titanium ore for titanium wedding ring Titanium Rimless Glasses designed titanium connecting rod and titanium plate flat irons manufactured by Tioga Brands.Tinoga Brands $17.95 · ‎In stock

TopzMobile said... [reply]

Thanks for sharing.Amazing information
zakkitech

Post a Comment

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