jQuery Mobile SimpleDialog with two Inputs?

谁说胖子不能爱 提交于 2019-12-12 04:58:05

问题


I am using the jQuery Mobile SimpleDialog (http://dev.jtsage.com/jQM-SimpleDialog/) on a mobile site and I don't quite understand how I could go about implementing it with multiple inputs.

Currently I have this:

<script type="text/javascript">
        $(function() {
            // $('#createlocation').remove();
        });
        $(document).delegate('#searchdialog', 'click', function() {
          $('<div>').simpledialog2({
            mode: 'button',
            headerText: 'Route Search',
            headerClose: true,
            buttonPrompt: 'Enter your search:',
            buttonInput: true,
            buttons : {
              'OK': {
                click: function () { 
                  alert($.mobile.sdLastInput);
                }
              },
            }
          })
        });
    </script>

Which is just called from a button click as follows:

<a href="#page1" id="searchdialog" data-theme="" data-icon="search">
                            Search Routes
                        </a>

So instead of having just one input, how could I have two?

Regards


回答1:


Instead of mode:'button' use mode:'blank'

Then you can put whatever you like into blankcontent - as many inputs as you want.



来源:https://stackoverflow.com/questions/10275319/jquery-mobile-simpledialog-with-two-inputs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!