Permalink
Browse files

Formatting

  • Loading branch information...
jzaefferer committed Aug 9, 2010
1 parent c003231 commit 3d46e53969e6b601613128f5fdd6fbc3b5aba426
Showing with 11 additions and 8 deletions.
  1. +11 −8 jquery.edible-ref.js
View
@@ -1,23 +1,26 @@
(function($) {
-$.widget("cgnjs.edible", {
+$.widget( "cgnjs.edible", {
_create: function() {
var self = this;
- this.element.bind("click.edible", function(event) {
+ this.element.bind("click.edible", function( event ) {
self.element.hide();
- self.input.val($.trim(self.element.text())).show().focus();
+ self.input
+ .val( $.trim( self.element.text() ) )
+ .show()
+ .focus();
});
- self.input = $("<input/>")
- .insertAfter(self.element)
+ self.input = $( "<input/>" )
+ .insertAfter( self.element )
.hide()
.blur(function() {
$(this).hide();
self.element.show();
})
- .keyup(function(event) {
- self.element.text(this.value);
+ .keyup(function( event ) {
+ self.element.text( this.value );
});
}
});
-})(jQuery);
+})( jQuery );

0 comments on commit 3d46e53

Please sign in to comment.