Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/component/prompt-popover
Inline popover prompts
https://github.com/component/prompt-popover
Last synced: 13 days ago
JSON representation
Inline popover prompts
- Host: GitHub
- URL: https://github.com/component/prompt-popover
- Owner: component
- Created: 2013-01-10T01:40:15.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-08-21T17:32:31.000Z (over 11 years ago)
- Last Synced: 2024-05-08T17:10:33.883Z (8 months ago)
- Language: JavaScript
- Size: 52.7 KB
- Stars: 3
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
Awesome Lists containing this project
README
# Prompt Popover
Popover prompt component built on top of [Popover](http://github.com/component/popover).
![js popover prompt component](http://cdn.dropmark.com/41933/d85858ab38a78c6ad8d912adffb1998feab5d207/Screen%20Shot%202013-01-09%20at%205.31.42%20PM.png)
## Installation
```
$ component install component/prompt-popover
```## Features
- all the features of Popover / Tip
## Events
- `show` the prompt is shown
- `hide` the prompt is hidden
- `cancel` the user closed the prompt or cancelled
- `ok` the user accepted## API
### new Prompt([placeholder])
Create a new popover with optional input `placeholder` text.
```js
var Prompt = require('prompt-popover');
var prompt = new Prompt('Password');
var el = $('#change-password').get(0);
prompt.show(el);
```### Prompt#cancel(text)
Set cancel button `text`.
### Prompt#ok(text)
Set cancel ok `text`.
### Prompt#show(el, [fn])
Attach to `el`, and invoke `fn` with
a boolean representing the user's choice.When `fn` is omitted you may still utilize the `cancel` / `ok` events.
### ...
View [Tip](http://github.com/component/tip) and [Popover](http://github.com/component/popover) for additional
API documentation.## License
MIT