I want to set the cursor position to last character in textbox.
I'm using this code.
$("#txt_search").focus();
In chrome it is set cursor to last but in mozilla it is in first.
You need to use it like this:
var data = $('#txt_search').val();
$('#txt_search').focus().val('').val(data);
Finally I got it.Using the Jquery Caret script. It is working in both chrome and mozilla.
Add jquery caret script in my file and used the following code.
var $inputExample = $('#txt_search');
$inputExample.caretToEnd();