I have a <div id="comment_posting_holder">
tag that holds a form with two elements: a textarea box and a submit button.
I want to have the div tag (containing the textarea and submit button) disappear if I click somewhere "OTHER" than the submit button. I have a start for the code below. So upon leaving focus from the textarea, I can make the div tag disappear.
The problem is that if the div disappears, so does the submit button which means I cannot submit the form! How can I fix this?
Any suggestions? Thank you!
**Facebook does this with it's comments. If you click on a "Post your comment..." field the textarea appears and then it will disappear upon losing focus other than if you pressed the submit button.
$('textarea').blur(function() {
$('#comment_posting_holder').hide();
});