Avisek Chakraborty
Avisek Chakraborty

Reputation: 8299

Jquery mobile: how to close a pop up dialog page from code?

I am opening a pop-up dialog like-

<a href="routeEdit.php" data-role="button"  data-icon="gear" data-inline="true" data-theme="b" data-transition="pop" data-rel="dialog">Edit</a>

Now, from that page, calling a method submit().

How will i close the pop-up from submit() method- without redirecting to main page?

Upvotes: 5

Views: 7873

Answers (3)

Javier Claros
Javier Claros

Reputation: 349

Try this:

$(".ui-popup").popup( "close" );

Upvotes: 1

Gank
Gank

Reputation: 4667

If you use pop in jQ Mobile 1.3.0,then

 $("#popupLogin").popup('close');

wourld be used.

Upvotes: 8

Pyae Phyoe Shein
Pyae Phyoe Shein

Reputation: 13787

$('#myDialog').dialog('close');

Try above coding. It's working for me.

Upvotes: 10

Related Questions