Alex Rivera | Logout

What is your favorite feature of jQuery?

Asked 2009-05-21T20:56:55.470
9

I just had the jQuery epiphany the other day and still feel like there is tons of power in it that I'm not utilizing.

So that said, what is your favorite feature of jQuery that saves you time and/or makes your client side applications that much more cool or powerful?

Edit
Report

1 Answer

7

Chaining! Huge jQuery chains are amazing. Sometimes I can't stop. It feels almost like doing everything in one line (you want to, don't deny it).

this.lasso = $('<div/>')
    .css({ position: 'absolute', overflow: 'hidden' })
    .addClass('ui-crop-lasso')
    .hide()
    .appendTo('body')
    .resizable({
        handles: 'all',
        start: setLasso,
        stop: setLasso,
        resize: setLasso,
        minHeight: 50,
        minWidth: 50
    })
    .draggable({
        containment: el,
        cursorAt: 'move',
        drag: setLasso
    });

Try it out, you'll be addicted in no time.

answered 2009-05-21T21:00:59.953

Your Answer