I need to set the cursor position of an input. I can get it to work fine in Chrome, but I'm having trouble with IE. I've found code that works fine in IE9/10, but I can't find anything that works in IE8 and older.
This is what I have for Chrome:
var cursorPosition = 5;
var textArea = $('.the-input-I-Need');
textArea[0].selectionStart = cursorPosition;
textArea[0].selectionEnd = cursorPosition;
//now the cursor would be at the 5th spot in the input
Anyone know a way to do this for IE? I can use jQuery, but no other plugins.