Reputation: 1
Is it possible to have data role as popup in changePage with Jquery Mobile.
I am trying the following code
$.mobile.changePage('Last.html',{
transition : 'slide',
role : 'popup'
});
Upvotes: 0
Views: 2276
Reputation: 92805
Unfortunately from your question it's not clear why you need this.
Nevertheless, according to the jQM 1.2.0 documentation:
To create a popup, add the data-role="popup" attribute to a div with the popup contents. Then create a link with the href set to the id of the popup div, and add the attribute data-rel="popup" to tell the framework to open the popup when the link is tapped. This is a similar markup pattern to the dialog widget. A popup div HAS to be nested inside the same page as the link.
So you may not be able address external page (Last.html
)
What you can do though:
popupbeforeposition
and/or popupafteropen
popup("open")
methodHere you can find one of the examples.
Upvotes: 1