Picnic Website Code Tutorials

iPhone/iPad Manually Trigger Keyboard on Div Javascript Tutorial

View Demo

Normally IOS only pops up the keyboard if you click in a textarea or input. Both of these JS snippets will pull up the keyboard on the iPhone and iPad if the text is in a div or other.

Method 1

<div onMouseDown="contentEditable=true">

Method 2

<div id="focus">
<script type="text/javascript">

Need help adding this or other code to your website? Post it here in the forum! Forum


Top Donators

Friends of Mine