Hi all,

I'm thinking about extending the callback system in the Tabs plugin to 
not only allow one callback, but different ones for more flexibility:

onActivate (invoked on click), onHide (invoked after old tab got 
hidden), onShow (invoked after new tab is revealed == callback as is now).

First question: Does that make sense at all?

If yes, the way it is now is that the callback function is called with 
the scope of the tab container (the div) that gets revealed and two 
arguments which the first could also be referred to with "this" obviously:

settings.callback.apply(toShow[0], [toShow[0], toHide[0]]);

Seems redundant to me. The only advantage I see here is that I could 
define a function without arguments if I only need to refer (via "this") 
to the tab that gets shown.

Wouldn't it be more reasonable to have "this" being the tab that was 
clicked?

settings.callback.apply(clicked, [toShow[0], toHide[0]]);


Feedback appreciated!


-- 
Klaus

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to