jquerymobile background popup disable touch - jquery-mobile

sorry if my english bad
when I create a dialog popup with jquerymobile, I get a transparent background, but when I touched it, causing the closure of the dialogue, how do I make the dialog will not close when I touch the background until I touch the cancel button?
thank you
for example login form dialog button in demos jquerymobile
http://jquerymobile.com/demos/1.2.0/docs/pages/popup/index.html

You can add data-dismissible="false" attribute as it describes in the document:
http://api.jquerymobile.com/popup/#option-dismissible

This behavior of a jQM popup is by design.
It looks like instead of a popup you just need to use a jQM modal dialog

Related

Programatically open a dialog as popup with jQuery Mobile

So I have a page and a dialog. When the user click the page button, one AJAX request will open the dialog with the results. Something like that simple example without AJAX: http://jsfiddle.net/rBBpx/
It works. The dialog opens programatically. But it hides the page content, showing the dialog as if it's another page. I know that popup's can open dialogs in-page with links, but I didn't get the point in how I can do that programatically.
I tried to change $.mobile.changePage() call to that, but it didn't worked as I expected:
$('#dialog').popup();
$('#dialog').popup('open');
How can I show that dialog in-page, as a popup? Is it ever possible? Thank you in advance!
In case you use phonegap, there is an alert plugin: http://docs.phonegap.com/en/edge/cordova_notification_notification.md.html
navigator.notification.alert("your AJAX result here");

jQuery Mobile popup that doesn't move when scrolling the page

I am using jQuery Mobile 1.3.0 RC1. I have a popup that I create programmatically at the bottom of my page and close after a few seconds using setTimeout (toast notification). It works very well, however if I happen to scroll the page while the popup is displayed, the popup gets scrolled too. I would like the popup not to move, i.e. stay in its position relative to the screen, not relative to the page. Is there a way to do that ?
I have tried playing with the data-position-to attribute in the HTML element, with the positionTo option of the "open" method, and tried placing the popup element inside a fixed transparent footer, none of these resulted in the desired behavior.
I had a similar problem last week. Finally solved it using modal dialog instead of popups.
For popups, I could find following.
$("#myPopup").on({
popupbeforeposition: function () {
$('.ui-popup-screen').off();
}
});
Which helped me in prevention of closing the dialog while user touched outside of popup. But scrolling issue was still there. So I changed all popups to modal dialogs. Hope it helps someone.

Twitter Bootstrap Closing Modal

I'm using the Twitter Bootstrap to make a project that opens modals with buttons. Each modal closes if you click on the same button that opens it. The modals will also close if you press escape or click on the background. However, if you click on the button to open one modal and then the button for another modal, the code opens both modals. If any modal is open, I want it to close when you click anywhere else on the page, including any of the other buttons. I'm really lost with the JavaScript, though.
Your question appears vague, so I will try to touch most of the points so that your question gets answered.
If you want the modal should not close on pressing esc or clicking some where else then try this....
<a data-controls-modal="your_div_id" data-backdrop="static"
data-keyboard="false" href="#">
To show a modal. use this inside a javascript function:
$('#myModal').modal('show')
To hide a modal use this:
$('#myModal').modal('hide')
To toggle a modal use this:
$('#myModal').modal('toggle')
Use these according to your need, hide a modal when you need may be on a button click.
I think this much is sufficient to achieve whatever you need.
If anything you aren't able to get something please post a comment.
Cheers!!!

Pop up menu in Jquery mobile

I am trying to create pop up menu using Jquery mobile, by clicking the button it should pop up menu options without changing the page, similar to select menu of jquery mobile.Is there any way to do that in JQM?
Thanks...
This is Popup widget what i needed. It may help someone in future.

Modal Dialog box with on/off and min/max button in Jquery

I need modal dialog box in which I can open forms and other html pages. It should have on/off and min/max button. Could anybody suggest me any link for the same. I am not getting this type of widget anywhere.
The JQuery plugin SimpleModal is pretty effective. I have used it before and am quite sure it should provide the functionality you require.

Resources