jQueryMobile - SimpleDialog

jQuery Mobile Framework :: SimpleDialog

A Popup Dialog Box for jQueryMobile

SimpleDialog aims to be a replacement for javascript dialog(), written for jQM.

Button Input Mode

This shows the simplest form of bool mode. You can add as many buttons as you want.

You clicked:

Open Dialog HTML
<p>You have entered: <span id="dialogoutput"></span></p>

<a href="#" id="simplebool" data-role="button">Open Dialog</a>
jQuery
$(document).delegate('#simplebool', 'click', function() {
  $(this).simpledialog({
    'mode' : 'bool',
    'prompt' : 'How about it?',
    'useModal': true,
    'buttons' : {
      'OK': {
        click: function () {
          $('#dialogoutput').text('OK');
        }
      },
      'Cancel': {
        click: function () {
          $('#dialogoutput').text('Cancel');
        },
        icon: "delete",
        theme: "c"
      }
    }
  })
})
GitHub SourceBlogContactjQueryMobile Homepage