oh awesome, I wasn't aware of that
On Sep 29, 7:19 am, "Brandon Aaron" <[EMAIL PROTECTED]> wrote:
> You can already do this in jQuery.
> $(window).bind("resize scroll", resizeScrollHandler);
>
> --
> Brandon Aaron
>
>
>
> On Sun, Sep 28, 2008 at 9:22 PM, Wil Stuckey <[EMAIL PROTECTED]> wrote:
>
> > one thing that i've seen in my code in several places is something
> > like this:
>
> > $(window).resize(resizeScrollHandler).scroll(resizeScrollHandler);
>
> > which could be simplified to:
>
> > $(window).bind(["resize", "scroll"], resizeScrollHandler);
>
> > this is obviously a very basic example but having the ability to bind
> > many event to a single handler could come in handy.
>
> > wil
>
> > On Sep 26, 1:59 pm, "John Resig" <[EMAIL PROTECTED]> wrote:
> > > I'm curious: Are there any pieces of code that use jQuery, right now,
> > > that you feel are unelegant or ugly? (Presumably ones that've already
> > > been optimized to the best of their ability.)
>
> > > One area of improvement that I was thinking of was something along the
> > lines of:
>
> > > // ugly
> > > $("#foo").val( $("#bar").val() );
>
> > > // a bit better
> > > $("#foo").val( $("#bar") );
>
> > > this would be an easy change, just make .attr() do something like:
>
> > > if ( arg.jquery )
> > > val = arg.val() || arg.text() || "";
>
> > > Any other thoughts? I wonder if there are common cases that could be
> > > improved with some simple code additions to core.
>
> > > --John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---