I am trying to select values of an input on focus. It initially works but it doesn’t hold the value. I want the value to remain selected until the user takes another action.
Here is my script:
$('.myclass1').focus(
function ()
{
this.select()
});
$('.myclass3').focus(
function ()
{
this.select()
});
$('.myclass3').focus(
function ()
{
this.select()
});
Here is the fiddle: http://jsfiddle.net/dan_vitch/c4YGn/1/.
When I select the input that holds a value. The value gets highlighted initially, doesn’t remain selected.
Replace
.focuswith.mouseupat every occurrence.http://jsfiddle.net/mblase75/c4YGn/2/