Make Popup After Focusing Input Text

test
Some time I have problem to create android apps using jQueryMobile, in my input text i want to make popup when click input text. For example this code I write into index.html :

<input class=”addpopup” type=”text” name=”address” id=”address”></input>

<div data-role=”popup” id=”popupAddfix”>
<form>
<h3>Your Address</h3>
<label >Address</label>
<input type=”text” name=”addfix” id=”fix” value=””/>

<button type=”submit” >Save</button>
</form>
</div>

And this code i write into my javascript file

$(document).on(‘focus’, ‘.addpopup’, function() {
$(‘#popupAddfix’).popup(‘open’);
});

This solution I get it from amazing friends from stackoverflow,
thank’s a loot

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s