JQuery手机弹出/对话框? [英] JQuery-mobile pop up/ dialog box?
问题描述
我尝试过 http://jquerymobile.com/test的不同方法/docs/pages/dialog-alt.html 等等。我不能得到他们的工作。所以如果你知道如何做一个简单的弹出窗口或一个简单的对话框,请给我一个例子。
如果你想在jquery手机中打开一个对话框,你必须使用一个属性 data-rel =dialog
,而href必须指向你对话框所在的URL: p>
< a href =http://jquerymobile.com/test/docs/pages/dialog-alt.html role =buttondata-rel =dialog>打开对话框< / a>
这是一个小提琴,以便您可以看到它如何工作。
希望它有帮助。
更新: p>
似乎jQuery Mobile对话框和某些设备有问题。
在GitHub信息库中打开一个问题。
我发现这个插件似乎工作得很好。 p>
I am building an app for mobiles, using jquery mobile framework. I want to be able to make a simple dialog box/pop up, so that when you click on a picture of a "question mark" the pop up/ dialog box would appear with a simple message. I have tried different approaches from http://jquerymobile.com/test/docs/pages/dialog-alt.html to so many others. I couldnt get non of them to work. So If you know how to make a simple pop up or a simple dialog box could you please give me an example!
If you want to open a dialog in jquery mobile you have to use an attribute data-rel="dialog"
and the href must point to a URL where your dialog lives:
<a href="http://jquerymobile.com/test/docs/pages/dialog-alt.html" data-role="button" data-rel="dialog">Open dialog</a>
Here's a fiddle so you can see how it works.
Hope it helps.
UPDATE:
It seems there's a problem with jQuery Mobile dialog and some devices.
There's an issue open in the GitHub repository.
I've found this plugin which seems to work really well.
这篇关于JQuery手机弹出/对话框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!