mobile - jQuery to make the input text field readonly -


i'm using jquery mobile , have input text field auto selected when tapped/clicked using following code:

$(document).ready(function() {      $('.highlight').click(function(){          var input = this;          input.focus();          input.setselectionrange(0,999);       }); }); 

i add prevent changes field because tried adding readonly="readonly" html stopped auto highlight (on mobiles).

any suggestions?


Comments