Auto select all text with jQuery

If you’re stuck using an older version of jQuery ( < 1.9 ) and need to auto select all text in a dynamically created input field you can combine .select() with .live() to make it work.

Refer the javascript code and demo below to see it in action.

Code

Result

Justin Kelly

Justin Kelly

Data Engineeer, Business Analytics, Web Developer, Library Technology specialising in PHP and Tableau

Based in Melbourne, Australia

Feel free to contact me justin@kelly.org.au or _justin_kelly