Posted By

wza on 07/12/10


Tagged

textmate


Versions (?)

select text (input


 / Published in: Other
 

  1. $("input, textarea").focus(
  2. function()
  3. {
  4. // only select if the text has not changed
  5. if(this.value == this.defaultValue)
  6. {
  7. this.select();
  8. }
  9. }
  10. )

Report this snippet  

You need to login to post a comment.