I have a contenteditable div which needs to be focussed at pageload (place cursor at the first line).
document.getElementById(\"editor\").focus() works
document.getElementById(\"editor\").focus()
I was able to add focus to a DIV by calling the focus() method chained to the attr() method
$el.attr('contenteditable', "true").focus()