/ Published in: jQuery
                    
                                        
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
jQuery(document).ready(function(){
$("input, textarea").focus(function(){
if ($(this).attr("value") == $(this).attr("title"))
$(this).attr("value", "")
});
$("input, textarea").blur(function(){
if ($(this).attr("value") == "")
$(this).attr("value", $(this).attr("title"))
});
});
URL: http://habrahabr.ru/blogs/jquery/98010/
Comments
 Subscribe to comments
                    Subscribe to comments
                
                