I like it.
--
Brandon Aaron
On 10/2/06, John Resig <[EMAIL PROTECTED]> wrote:
> > I like that. You could then use it like this:
> > $(...).ifelse(':visible', ifCallback).doOtherStuff();
> > $(...).ifelse(':visible', ifCallback, elseCallback).doOtherStuff();
> > $(...).ifelse(':visible', null, elseCallback).doOtherStuff();
> >
> > I'll put that in, if noone objects :-)
>
> FYI, you can already call an extra Function argument on any
> destructive operation, for example:
>
> .find( "foo", ifCallback )
> .filter( "foo", ifCallback )
> .not( "foo", ifCallback )
> etc. etc.
>
> I didn't document this yet, since I didn't think anyone was going to
> care to use it, except for me. Heh.
>
> Since there's already an ifCallback for all those functions, adding in
> an optional elseCallback wouldn't be "that bad" and would probably be
> preferrable to adding a new .ifelse() function. What's everyone's
> thoughts on this?
>
> --John
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/