[jQuery] Unselect text
[jQuery] Unselect text
I have the following script to auto select the text in a input field
on focus.
$("input[@type='text']").focus(function(){
if($(this).val().length > 0){
this.select();
}
});
On blur is there a way in can unselect the selected text?