sweetalert-1.0.0

所属分类:JavaScript/JQuery
开发工具:JavaScript
文件大小:1236KB
下载次数:2
上传日期:2016-04-28 10:23:29
上 传 者3624626
说明:  利用HTML5,CSS3,JavaScript写的很酷的提示框。
(Using HTML5, CSS3, JavaScript writes a cool tip box .)

文件列表:
sweetalert-1.0.0\.editorconfig (167, 2015-05-21)
sweetalert-1.0.0\.jshintrc (137, 2015-05-21)
sweetalert-1.0.0\bower.json (455, 2015-05-21)
sweetalert-1.0.0\dev\gulpfile-wrap-template.js (364, 2015-05-21)
sweetalert-1.0.0\dev\ie9.css (637, 2015-05-21)
sweetalert-1.0.0\dev\modules\default-params.js (504, 2015-05-21)
sweetalert-1.0.0\dev\modules\handle-click.js (3459, 2015-05-21)
sweetalert-1.0.0\dev\modules\handle-dom.js (4062, 2015-05-21)
sweetalert-1.0.0\dev\modules\handle-key.js (2025, 2015-05-21)
sweetalert-1.0.0\dev\modules\handle-swal-dom.js (3333, 2015-05-21)
sweetalert-1.0.0\dev\modules\injected-html.js (1404, 2015-05-21)
sweetalert-1.0.0\dev\modules\set-params.js (5482, 2015-05-21)
sweetalert-1.0.0\dev\modules\utils.js (1526, 2015-05-21)
sweetalert-1.0.0\dev\modules (0, 2015-08-06)
sweetalert-1.0.0\dev\sweetalert.es6.js (7501, 2015-05-21)
sweetalert-1.0.0\dev\sweetalert.scss (14145, 2015-05-21)
sweetalert-1.0.0\dev (0, 2015-08-06)
sweetalert-1.0.0\dist\sweetalert-dev.js (116876, 2015-05-21)
sweetalert-1.0.0\dist\sweetalert.css (18130, 2015-05-21)
sweetalert-1.0.0\dist\sweetalert.min.js (16141, 2015-05-21)
sweetalert-1.0.0\dist (0, 2015-08-06)
sweetalert-1.0.0\example\example.css (11905, 2015-05-21)
sweetalert-1.0.0\example\example.scss (10939, 2015-05-21)
sweetalert-1.0.0\example\images\logo_big.png (17162, 2015-05-21)
sweetalert-1.0.0\example\images\logo_big@2x.png (37467, 2015-05-21)
sweetalert-1.0.0\example\images\logo_small.png (4459, 2015-05-21)
sweetalert-1.0.0\example\images\logo_small@2x.png (9760, 2015-05-21)
sweetalert-1.0.0\example\images\te-logo-small.svg (1090, 2015-05-21)
sweetalert-1.0.0\example\images\thumbs-up.jpg (30052, 2015-05-21)
sweetalert-1.0.0\example\images\vs_icon.png (3873, 2015-05-21)
sweetalert-1.0.0\example\images\vs_icon@2x.png (8254, 2015-05-21)
sweetalert-1.0.0\example\images (0, 2015-08-06)
sweetalert-1.0.0\example (0, 2015-08-06)
sweetalert-1.0.0\gulpfile.js (2406, 2015-05-21)
sweetalert-1.0.0\index.html (19155, 2015-05-21)
sweetalert-1.0.0\LICENSE (1083, 2015-05-21)
sweetalert-1.0.0\package.json (1066, 2015-05-21)
sweetalert-1.0.0\sweetalert-1.0.0.zip (646584, 2015-07-26)
... ...

SweetAlert ========== An awesome replacement for JavaScript's alert. ![A success modal](https://raw.github.com/t4t5/sweetalert/master/sweetalert.gif) [See it in action!](http://t4t5.github.io/sweetalert) [Learn how to use it!](https://www.ludu.co/lesson/how-to-use-sweetalert) Usage ----- You can install SweetAlert through bower: ```bash bower install sweetalert ``` Or through npm: ```bash npm install sweetalert ``` Alternatively, download the package and reference the JavaScript and CSS files manually: ```html ``` **Note:** If you're using an older version than v1.0.0, the files are `lib/sweet-alert.min.js` and `lib/sweet-alert.css` Tutorial -------- The easiest way to get started is follow the [SweetAlert tutorial on Ludu](https://www.ludu.co/lesson/how-to-use-sweetalert)! Examples -------- The most basic message: ```javascript sweetAlert("Hello world!"); ``` A message signaling an error: ```javascript sweetAlert("Oops...", "Something went wrong!", "error"); ``` A warning message, with a function attached to the "Confirm"-button: ```javascript sweetAlert({ title: "Are you sure?", text: "You will not be able to recover this imaginary file!", type: "warning", showCancelButton: true, confirmButtonColor: "#DD6B55", confirmButtonText: "Yes, delete it!", closeOnConfirm: false, html: false }, function(){ swal("Deleted!", "Your imaginary file has been deleted.", "success"); }); ``` A prompt modal where the user's input is logged: ```javascript sweerAlert({ title: "An input!", text: 'Write something interesting:', type: 'input', showCancelButton: true, closeOnConfirm: false, animation: "slide-from-top" }, function(inputValue){ console.log("You wrote", inputValue); }); ``` [View more examples](http://t4t5.github.io/sweetalert) Themes ------ SweetAlert can easily be themed to fit your site's design. SweetAlert comes with three example themes that you can try out: **facebook**, **twitter** and **google**. They can be referenced right after the intial sweetalert-CSS: ```html ``` Browser compatibility --------------------- SweetAlert works in most major browsers (yes, even IE). Some details: - **IE8**: (Dropped since v1.0.0-beta) - **IE9**: Works, but icons are not animated. - **IE10+**: Works! - **Safari 4+**: Works! - **Firefox 3+**: Works! - **Chrome 14+**: Works! - **Opera 15+**: Works! Contributing ------------ If you want to contribute: - Fork the repo - Make sure you have [Node](http://nodejs.org/), [NPM](https://www.npmjs.com/) and [Gulp](http://gulpjs.com/) installed. When in the SweetAlert directory, run `npm install` to install the dependencies. Then run `gulp` while working to automatically minify the SCSS and JS-files. - Keep in min that SweetAlert uses Browserify in order to compile ES6-files. For easy debugging, make sure you reference the file `dist/sweetalert-dev.js` instead of `sweetalert.js`. - After you're done, make a pull request and wait for approval! :) Related projects ---------------- * [SweetAlert for Android](https://github.com/pedant/sweet-alert-dialog) * [SweetAlert for Bootstrap](https://github.com/lipis/bootstrap-sweetalert) * [SweetAlert for AngularJS](https://github.com/oitozero/ngSweetAlert) * [SweetAlert for RubyOnRails](https://github.com/sharshenov/sweetalert-rails)

近期下载者

相关文件


收藏者