How can I show text, using jQuery (with ul li p…), after focus is losed, and textarea is empty, now when I get focus I loose text, but how to show it if I didn’t entered anything?
My “pseudo placeholder” looks like this:
$('textarea.hinted').focus(function() {
console.log('focus');
$('#textarea-placeholder').hide();
});
$('textarea.hinted').blur(function() {
console.log('blur');
$('#textarea-placeholder').hide();
});
$('textarea.hinted').focusout(function() {
console.log($(this).val());
if (this.val == '') {
$('#textarea-placeholder').show();
}
});
html
should work,
you should also probably remove the blur even as they are effectively the same thing (i believe)