Moving cursor position in contentEditable div
<p>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.</p>

<p>I'm using:</p>

<pre><code>var r = $("#mydiv").createTextRange(); 
r.moveStart("character", l); 
r.moveEnd("character", l);      
r.select();
</code></pre>

<p>The error I get:</p>

<pre><code>Uncaught TypeError: Object [object Object] has no method 'createTextRange'
</code></pre>

<p>I've seen this question posted around, but I still can't seem to perform createTextRange(). Any suggestions?</p>
