https://github.com/angeal185/jquery-prompt
jquery prompt plugin for electron and the browser
https://github.com/angeal185/jquery-prompt
browser electron jquery plugin prompt
Last synced: 8 months ago
JSON representation
jquery prompt plugin for electron and the browser
- Host: GitHub
- URL: https://github.com/angeal185/jquery-prompt
- Owner: angeal185
- License: mit
- Created: 2019-04-20T03:54:54.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-11T00:58:17.000Z (over 5 years ago)
- Last Synced: 2025-02-07T10:08:14.161Z (8 months ago)
- Topics: browser, electron, jquery, plugin, prompt
- Language: JavaScript
- Homepage: https://angeal185.github.io/jquery-prompt/
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# jquery-prompt
jquery prompt plugin for electron and the browser.demo: https://angeal185.github.io/jquery-prompt/
### Installation
npm
```sh
$ npm install jquery-prompt
```#### electron
ensure jquery is installed.
```js
require('jquery-prompt');
```
```html```
#### browser
```html
```
### info
```js
// prompt string defaults
{
header: 'prompt', //header text
type: 'text', //input type
speed: 'fast', //animation speed
placeholder: 'cannot be empty', //placeholder text
cBtn: 'Cancel', //cancel button text
sBtn: 'Submit', //submit button text
error: 'cannot be empty' //error msg text
}// prompt boolean defaults
{
header: 'prompt', //header text
speed: 'fast', //animation speed
cBtn: 'Cancel', //cancel button text
sBtn: 'Submit' //submit button text
}
//demo// set global prompt string defaults
$.xPrompt.defaults = {
placeholder: "test",
error: "error"
};// set global prompt boolean defaults
$.xPromptQ.defaults = {
speed: 'slow'
};//prompt string demo
//$.xPrompt(options,callback)$('.ptest').on('click', function(){
$.xPrompt({header: 'header', placeholder: 'enter text'}, function(i){
// do something with string
console.log(i)
})
})//prompt boolean demo
//$.xPromptQ(options,callback)$('.ptestQ').on('click', function(){
$.xPromptQ({header: 'are you sure'}, function(i){
// do something with boolean
console.log(i)
})
})```