
< link href="/path/to/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
- <script type="text/javascript">
- $(document).ready( function() {
- $("#alert_button").click( function() {
- jAlert('This is a custom alert box', 'Alert Dialog');
- });
- $("#confirm_button").click( function() {
- jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
- jAlert('Confirmed: ' + r, 'Confirmation Results');
- });
- });
- $("#prompt_button").click( function() {
- jPrompt('Type something:', 'Prefilled value', 'Prompt Dialog', function(r) {
- if( r ) alert('You entered ' + r);
- });
- });
- $("#alert_button_with_html").click( function() {
- jAlert('You can use HTML, such as <strong>bold</strong>, <em>italics</em>, and <u>underline</u>!');
- });
- $(".alert_style_example").click( function() {
- $.alerts.dialogClass = $(this).attr('id'); // set custom style class
- jAlert('This is the custom class called “style_1”', 'Custom Styles', function() {
- $.alerts.dialogClass = null; // reset to default
- });
- });
- });
- </script>
* This source code was highlighted with Source Code Highlighter.Только зарегистрированные пользователи могут оставлять комментарии. Войдите, пожалуйста.
комментарии (46)