Skip to content

Commit

Permalink
More whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypoydar committed Jan 29, 2009
1 parent 976b3b7 commit 7b4a23c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions jquery.form_prompt.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* jQuery Form Input Prompt Plugin 0.3.1
* jQuery Form Input Prompt Plugin 0.4.0
*
* Seemingly populate form inputs with text that disappears when the field is focussed.
* Works by not actually modifying the form field at all, instead an overlay div with
Expand Down Expand Up @@ -46,7 +46,6 @@

return this.each(function() {


var input = $(this);

// use native placeholder attribute in Safari
Expand Down Expand Up @@ -79,9 +78,9 @@
prompt.hide();
}

input.click(selectInput); // Form field is clicked
input.keyup(selectInput); // Form field is tabbed into
prompt.click(selectInput); // Prompt element is clicked
input.click(selectInput); // Form field is clicked
input.keyup(selectInput); // Form field is tabbed into
prompt.click(selectInput); // Prompt element is clicked

input.blur(function() {
if (input.val() == '') { prompt.show(); }
Expand All @@ -90,4 +89,4 @@
});
};

})(jQuery);
})(jQuery);

0 comments on commit 7b4a23c

Please sign in to comment.