cordova - creating 2 popup's programatically(calling 2nd popup from 1st one) in jquery mobile -


i need create 2 popup's programmatically , each popup should contain 1 input box , 1 ok button , 1 cancel button.

upon clicking on first popup ok button have bringup second popup.

i new jquery mobile, looked many docs didnt proper way it.

i tried this. didn't worked.

var $popup = $("<div/>").popup({         dismissible : false,         theme : "a",         overlyatheme : "a",         transition : "pop"     }).bind("popupafterclose", function() {                     //remove popup when closing         $(this).remove();     }); 

how can in js file?..

thanks:).

2 popus can not active @ same time.

there's workaround, , here's old example: http://jsfiddle.net/gajotres/8arrt/

$(document).on('pagebeforeshow','#index',function(e,data){         $('#test-button').on('click', function(e) {         $('#myfirstpopup').popup('open', {x : 100, y : 500, positionto : 'origin'});     });           $('#popup-button').on('click', function(e) {          settimeout(function(){$('#mysecondpopup').popup('open', {x : 100, y : 100, positionto : 'origin'});},100)          $('#myfirstpopup').popup('close');     }); }); 

basically if want open second popup must close first one. that's why need settimeout opet second popup after first 1 has been closed.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -