9
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.