On Jul 14, 1:51 pm, "Dan G. Switzer, II" <[EMAIL PROTECTED]>
wrote:
> The default behavior is show/hide. If you use manual callbacks you need to
> define the full behavior, so you'll want to add the show()/hide() calls to
> your jQuery chain.

The intention wasn't to define the functions which do the showing/
hiding, but to provide callbacks which are called upon showing/hiding
(e.g. "onhide" and "onshow"). That would enable the original code
(taken from another post from earlier today) to cleanly do its
Highlight() only in the case of show(). As it is now, he calls
Highlight() whether the block is visible or not, which is a bit of a
waste.

Obviously, if toggle() already has an overload which takes two
callbacks then my proposal is completely incompatible with existing
code (and therefore fundamentally broken). i wasn't aware of the
toggle(even,odd) function when the idea came to mind.

Though by using another overload...

toggle(Object props)

...

toggle({onshow:callbackShow,onhide:callbackHide});

...

:)

Reply via email to