In my jquery mobile application I would like to automatical set the focus on an input field after a popup is opened. The input field is in the popup as below. The focus is correctly set at the beginning but lost after the popup is fully lowded.
<!-- Link--><a onclick="$('#popup_input').focus()" href="#popup" data-iconpos="top" data-rel="popup" data-position-to="window" data-role="button" data-inline="false" data-transition="pop" data-icon="plus" data-theme="b">open</a>
<div data-role="popup" id="popup" data-overlay-theme="a" data-theme="c" data-dismissible="false" style="max-width:400px;" class="ui-corner-all">
<div data-role="header" data-theme="a" class="ui-corner-top">
<h1>Popup</h1>
</div>
<div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
<h3 class="ui-title">Focused Field</h3>
<p>
<input type="text" id="popup_input" />
</p> <a href="#" data-role="button"data-rel="back">Close</a>
</div>
</div>
Thanks for your help
kind reagrds