/ Published in: jQuery
On focus, remove text inside input containing a title, put it back if it has not change
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$(function(){ $("input[type*='text'][title]") .bind("focus",function(){ if(this.value==this.title){ this.value=""; } }) .bind("blur",function(){ if(this.value==""){ this.value=this.title; } }); });