- alert(($(inputSelector).hasClass("default") ? "def: ": "ok: ") + $(inputSelector).val());
- });
- })(inputSelector, defaultText);
+ }).hide().data("inputField", $(this));
+ $(this).after(textarea);
+ (function(inputField, textarea) {
+ $(inputField).focus(function() {
+ $(this).hide().attr("disabled", "disabled");
+ textarea.show().focus();
+ }).addClass("default").val(defaultText);
+ $(inputField.form).submit(function() {
+ if (textarea.val() == "") {
+ return false;
+ }
+ });
+ })(this, textarea);
+ });