Search code examples
javascriptjqueryhtmlcursor

On load set blinking cursor on a div


I am working on a text editor where I am appending an iframe over textarea for text styling. But my problem is that I have to make the cursor blink on the iframe body when I am trying to open the editor.I am very new to this. Please help.


Solution

  • Try this -

    $('#iframeId').focus();
    

    To set focus at end of text, see this -

    Use JavaScript to place cursor at end of text in text input element