I want to have a textarea that starts with "I am " but it is non removable, like I want it to always be there not a placeholder as well as no one can remove it which gets hidden when text is starting to be written. How would I do this for a textarea.
Code From Fiddle
HTML
<input type="text" class="prefix" value="prefix_" >
Javascript
$('input.prefix').keyup(function(){
var prefix = 'prefix_';
if(!(this.value.match('^prefix_'))){
this.value = prefix;
}
});
$('input.prefix').blur(function(){
var prefix = 'prefix_';
if(!(this.value.match('^prefix_'))){
this.value = prefix;
}
});