Jörn Zaefferer schrieb:
> nice to see a new release.
>> * Here is an overview of the settings that can be passed in inside the
>> object literal (shown values are default values):
>>
>> {
>> fxFade: null,
>> fxSlide: null,
>> fxShow: null,
>> fxHide: null,
>> fxSpeed: 'normal',
>> fxShowSpeed: null,
>> fxHideSpeed: null,
>> fxAutoheight: false,
>> callback: null,
>> selectedTabClass: 'selected',
>> hiddenTabContainerClass: 'tabs-hide'
>> }
>>
> Talking about verbosity, isn't fxFade and fxSlide and fxShow and fxHide
> somewhat verbose?
Jörn, I think not. If I've had that documented already you would know
why not :-)
Usage is as follows:
fxSlide: true
fxFade: true
This is meant to define the same animation for opening (slideDown) and
closing a tab (slideUp) in the shortest possible way. Both can be combined.
fxHide and fxShow on the other hand is for passing in your own custom
animation:
fxShow: {height: show}
That way you can have an animation for showing a new tab but no
animation for closing. Or vice versa. Or two different animations.
Because of that I also added the possibility to pass in different speeds
(fxShowSpeed, fxHideSpeed). If not defined they default to fxSpeed which
defaults to 'normal'.
Note that fxFade/fxSlide overrule custom animation. I did that to not
add to much overhead. Shouldn't be a problem if documented.
So next maybe I can add an additional element for styling purposes ;-)
> Another, more important thing, consider this:
> $('#container').tabs().bind('tabChange', function() {
> // do stuff on every tab change, just like 'callback' above
> }).bindOnce('tabChange', function() {
> // do stuff only on the first tab change
> });
>
> Inside your plugin code, you would somewhere use this:
> containerReference.trigger('tabChange');
>
> Actually, there is no bindOnce (oook!), but there is still hope.
>
> jQuery already has a nice event handling system, why not just use it for
> custom events?
I already tried that with my new history/hijax plugin. But I had the
need to pass in the 'e' object, which isn't possible in trigger...
I needed e.clientX to distinguish between a true click and a triggered
click event. Maybe someone has an alternative idea for that?
-- Klaus
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/