Klaus Hartl schrieb:
> Jörn Zaefferer schrieb:
>>> 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?
>> I now sure if someone really gains anything when providing the callback to 
>> the tabs plugin instead of simply binding to the click event directly.
> 
> With simple binding you can only call the handler before the tab is 
> clicked or after (that would eliminate onActivate and onShow (ok, not 
> exactly because there's some more stuff going on after a tab is shown, 
> but that wouldn't make much difference)). I'm also not sure how well 
> that would integrate with history support.

Besides with simple binding it is not as easy to get the elements that 
are worked with... instead of having them as arguments already you would 
have to do some :hidden and :visible checks, so I think the callbacks 
make some sense.


-- Klaus

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

Reply via email to