问题
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