I'm trying to move the cursor of a content editable div to the end of the line. By default, it goes to the beginning of the line.
I'm using:
var r = $("#mydiv").createTextRange();
r.moveStart("character", l);
r.moveEnd("character", l);
r.select();
The error I get:
Uncaught TypeError: Object [object Object] has no method 'createTextRange'
I've seen this question posted around, but I still can't seem to perform createTextRange(). Any suggestions?