Alert, confirm solution based on jquery ui (skin replacement supported), jqueryconfirm
Functions:
1. Modify the title style. Put the title style of jquery ui. Supports skin replacement.
2. Change the button style to the jqueryui button style.
3. Replace the background of the model window with the modeled background of jqueryui.
Code:
// First introduce jquery, as well as the ui package and skin style, such as: <script src = ".. /js/ui/jquery-1.11.0.min.js "> </script> <script src = ".. /js/ui/jquery-migrate-1.1.0.min.js "> </script> <script src = ".. /js/ui/minified/jquery. ui. core. min. js "> </script> <script src = ".. /js/ui/minified/jquery. ui. widget. min. js "> </script> <script src = ".. /js/ui/minified/jquery. ui. mouse. min. js "> </script> <script src = ".. /js/ui/minified/jquery. ui. button. min. js "> </scrip T> <script src = ".. /js/ui/minified/jquery. ui. draggable. min. js "> </script> <link rel =" stylesheet "type =" text/css "href = ".. /js/ui/themes/humanity/jquery-ui.css "> </link> (function ($) {$. alerts = {// These properties can be read/written by accessing $. alerts. propertyName from your scripts at any time verticalOffset:-75, // vertical offset of the dialog from center screen, in pixelshorizontalOffset: 0, // Horizontal offset of the dialog from center screen, in pixels/repositionOnResize: true, // re-centers the dialog on window resizeoverlayOpacity :. 01, // transparency level of overlayoverlayColor: '# fff', // base color of overlaydraggable: true, // make the dialogs draggable (requires UI Draggables plugin) okButton: 'confirmed', // text for the OK buttoncancelButton: 'cancel', // text for the Cancel bu TtondialogClass: null, // if specified, this class will be applied to all dialogs // Public methods alert: function (message, title, callback) {if (title = null) title = 'alert '; $. alerts. _ show (title, message, null, 'alert ', function (result) {if (callback) callback (result) ;}, confirm: function (message, title, callback) {if (title = null) title = 'Confirm'; $. alerts. _ show (title, message, null, 'Confirm', function (result) {if (callback) callback (result) ;}) ;}, prompt: function (message, value, title, callback) {if (title = null) title = 'propt'; $. alerts. _ show (title, message, value, 'propt', function (result) {if (callback) callback (result) ;}, // Private methods _ show: function (title, msg, value, type, callback) {$. alerts. _ hide (); $. alerts. _ overlay ('show'); $ ("BODY "). append ('<div I D = "popup_container" style = "width: 300px; height: 150px;"> '+'
The above is all the content of this article. I hope you will like it.