I have following html:
<div id="content" contenteditable="true" style="font-family: Helvetica;">
Some text
<div id="cursor" contenteditable="true"></div>
Some other text.
</div>
Now I want to set cursor after Some text (exactly in #cursor
). I tried both way:
$('#cursor').focus();
document.getElementById('#cursor').focus();
but it didn't work. Is there any way to do this?