jQueryMobile - SimpleDialog
A Popup Dialog Box for jQueryMobile
SimpleDialog aims to be a replacement for javascript dialog(), written for jQM.
- Overview
- Intro & Features
- Download & Use
- Methods and Events
- Full Options Matrix
- Demos
- Boolean / Button Mode
- String / Input Mode
- Raw HTML Mode
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" } } }) })