I made this simple function to add placeholder in browsers that do not support it:
The question is: How can I add to that function the possibility to remove the placeholder when the user click inside it?
Try to use removeAttr() like,
$('input,textarea').focus(function(){
$(this).removeAttr('placeholder');
});
To get the placeholder value
again on blur()
try this,
$('input,textarea').focus(function(){
$(this).data('placeholder',$(this).attr('placeholder'))
.attr('placeholder','');
}).blur(function(){
$(this).attr('placeholder',$(this).data('placeholder'));
});