actionsheet.html 976 B

123456789101112131415161718192021222324252627282930313233
  1. <script>
  2. function showCustomHtmlSheet() {
  3. $.afui.actionsheet('<a >Back</a><a onclick="alert(\'hi\');" >Show Alert 3</a><a onclick="alert(\'goodbye\');">Show Alert 4</a>');
  4. }
  5. function showCustomJsonSheet() {
  6. $.afui.actionsheet(
  7. [{
  8. text: 'back',
  9. cssClasses: 'red',
  10. handler: function () {
  11. $.afui.goBack();
  12. }
  13. }, {
  14. text: 'show alert 5',
  15. cssClasses: 'blue',
  16. handler: function () {
  17. alert("hi");
  18. }
  19. }, {
  20. text: 'show alert 6',
  21. cssClasses: '',
  22. handler: function () {
  23. alert("goodbye");
  24. }
  25. }]);
  26. }
  27. </script>
  28. This creates a slide in action sheet from the bottom.
  29. <br />
  30. <br />
  31. <a class="button" onClick="showCustomHtmlSheet()">Show Custom Html Sheet</a>
  32. <a class="button" onClick="showCustomJsonSheet()">Show Custom Json Sheet</a>