Created
January 26, 2012 20:04
-
-
Save nikku/1684769 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <a href="#" id="show-alert">alert</a>, | |
| <a href="#" id="show-confirm">confirm</a>, | |
| <a href="#" id="show-prompt">prompt</a> | |
| <script type="text/javascript"> | |
| $("#show-alert").click(function(event) { | |
| $.fn.dialog2.helpers.alert("This dialog is non intrusive", { | |
| close: function() { | |
| alert("This one is!"); | |
| } | |
| }); | |
| event.preventDefault(); | |
| }); | |
| $("#show-prompt").click(function() { | |
| $.fn.dialog2.helpers.prompt("What is your age?", { | |
| ok: function(event, value) { alert("Your age is: " + value); }, | |
| cancel: function() { alert("Better tell me!"); } | |
| }); | |
| event.preventDefault(); | |
| }); | |
| $("#show-confirm").click(function() { | |
| $.fn.dialog2.helpers.confirm("Is this dialog non intrusive?", { | |
| confirm: function() { alert("You said yes? Well... no"); }, | |
| decline: function() { alert("You said no? Right choice!") } | |
| }); | |
| event.preventDefault(); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment