Can I open several dialog on top of each other in JQM? - jquery-mobile

As the question says I am interested to know if it is possible to open more than one dialog in JQM.
Thanks in advance,
Sincerely Babak

Yes it is possible.
As long as the page structure complies with JQM documentation it is possbile to open dialogs on top of other dialogs by calling
$.mobile.changePage('#page-id', {transition: 'pop', role: 'dialog'} ) ;

Related

How to open or link to my addon preference pane from link in a page

I am creating an addon from which I display a page from the data/ resources. I would like to put in there a link to open the addon preferences page. Is it possible? How?
Thanks in advance,
Stefano
Absolutely possible.
In depth reply here: How to open an add-on's preference panel?
to add link on your site make it dispatch custom event, catch that custom event in your addon and use the window the event came from and execute the for example:
Services.wm.getMostRecentWindow('navigator:browser').BrowserOpenAddonsMgr('addons://detail/%7Bd10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d%7D/preferences')
or on load of your website you can addEventListener to the link on your website. The addEventListener listener function will be in your addon.

Jquery Mobile - Edit Icon

I currently have a jquery page where I am using Delete and Edit icons.
For the delete icon, I am using:
data-icon="delete"
For the edit icon, I am using
data-icon="plus"
Just wondering what the standard icon is for edit.
Thanks in advance
It is :
data-icon="edit"
But you will need to use at least jQuery Mobile 1.3 to have it available.
Working jsFiddle example: http://jsfiddle.net/4z64J/
I think there is not a default icon for edit.
Maybe I would also use data-icon="plus" or data-icon="gear".
If you want you can use a custom icon.
http://andymatthews.net/code/jQuery-Mobile-Icon-Pack/font-awesome/ - This is a nice pack (data-icon="pencil" would do the work for you, I think.)
Regards!
P.S. I have read what Gajotres answered. It is great that this icon is added in jQuery Mobile latest! Thanks for the info!

Jquery mobile - How to handle click event on body tag?

As the title, I want to handle click event on body tag to release focusing of text input. I am using Phonegap and Jquerymobile. Please helps!
Thanks alot.
What is the problem? I developed a lot ofapplications with phonegap and jqm and I never noticed the problem which you describe. The blur event fires automatically.
Anyway you can use this to:
jQuery('body').on('click',function(){
jQuery('input').trigger('blur');
})

Close all popups in jquery mobile

I am working with JQM and need to close any 'open' popups.
Is there a way to close any currently 'open' popups in JQM?
lee
I found an answer. For anyone else looking to do this, here is the trick:
$('.ui-popup').popup('close');
lee

Is there an equivalent to ModalPopup in jQuery UI?

Is there an equivalent of ASP.NET's ModalPopup in jQuery UI?
I'm not sure about ASP.net's implementation, but jQuery DEFINITELY has these types of popups.
Here's your basic popup: http://jqueryui.com/demos/dialog/
Here's a list of plugins that are specifically modal popups: http://plugins.jquery.com/search/node/modal
http://jqueryui.com/demos/dialog/#modal
$( ".selector" ).dialog({ modal: true });
IMO, the jQuery UI popups behave much better than their ASP.Net equivalents (including when used with ASP.Net).
I've a great personal collection of top 15+ jquery modal plugins which really satisfies all our modal pop requirements using jQuery. Please feel free to comment about it.
http://itswadesh.wordpress.com/2011/04/13/15-jquery-popup-modal-dialog-plugins-and-tutorials/
You can try this http://www.ericmmartin.com/projects/simplemodal-demos/. Here variety of Modal Pop ups are available. They all are really awesome. Choose and modify them as per your requirement.

Resources