DISQUS

DISQUS Hello!  The comments on this profile are unclaimed and thus are unverified.

Do they belong to you? Claim these comments.

Boyan's picture

Unregistered

Feeds

aliases

  • Boyan

Boyan

2 years ago

in Dynamic Ajax Tabs in 20 Lines | 20bits on 20bits
I'm not sure how useful this is but here is a small addition to your TabbedPane function:
// If the current tab is set to active, fetch it's content
if ($(id).hasClassName('active')) {
new Ajax.Updater(pane, tabs[id], $H({
asynchronous: true,
method: 'get',
evalScript: true
}).merge(args));
}

This is useful when you want all tabs to be dynamic without a default content but you want one of them to load as default. Example:

First
Second
Third
Fourth

2 years ago

in Dynamic Ajax Tabs in 20 Lines | 20bits on 20bits
Nice work! You are missing a closing "div" at the end (for ).
Returning? Login