ios-inspired action sheet.
$ component install matthewmueller/action-sheet
actionsheet('Are you sure?')
.button('ok', function() { alert('ok!'); })
.button('maybe', function() { alert('maybe...'); })
.cancel('cancel')
.show();
Initialize a new actionsheet
with a title
.
Create a button with a title
and optional callback fn
when clicked. The optional cls
allows you to add classes to the button.
Create a cancel button with a title
and optional fn
when clicked. Will automatically hide the action sheet when clicked. The optional cls
allows you to add classes to the button.
Show the action sheet.
Hide the action sheet.
Removes the action sheet from the DOM and unbinds all events.
- Tests
- Prevent scrolling when action sheet is active
- Allow esc to hide action sheet
MIT