Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
## observeOnce implementation Element.addMethods({ observeOnce: function(element, name, fn) { var wrapper = function(event) { this.stopObserving(name, wrapper) fn.call(this, event) } $(element).observe(name, wrapper) } }) ## usage draggable.observeOnce('mouseover', function(e) { new Draggable(draggable, { revert: true }) });
This paste will be private.
From the Design Piracy series on my blog: