A jQuery Plugin To Create A Timed Modal Dialog

The jQuery Timed Dialog plugin helps developers create modal/alert/customizable info dialogs to replace the original popups.

Key Features:

  • Easy to design with your own CSS.
  • Auto reject after a timeout, with or without a countdown timer
  • Supports any HTML content included in the dialog.
  • It allows you to append the dialog to any container element, not just the entire body.

How to make use of it:

1. Import the jQuery Timed Dialog plugin’s information into the HTML file.

<link href="/path/to/css/timed-dialog.css" rel="stylesheet" />
<script src="/path/to/cdn/jquery.min.js"></script>
<script src="/path/to/dist/timed-dialog.min.js"></script>

2. Create a ‘Info‘ dialog.

$().timedDialog({
  body: '<b>HTML Content</b> is supported as well.',
  title: 'Dialog Title'
});

3. Create a Confirm dialog and execute a function when the user clicks the ‘Confirm‘ button.

$().timedDialog({
  type: 'confirmation',
  body: 'Are You Sure?',
  title: 'Confirm Your Action',
  btnConfirm: {
    text: 'Confirm',
    action: () => {
    alert('done')
  }}
});

4. Customize the width/height of the dialog.

$().timedDialog({
  width: 400,
  height: 300
});

5. Determine auto-close the dialog after a timeout, with an animated countdown timer on the ‘Dismiss’ button.

$().timedDialog({
  closeOnTimer: true,
  timeout: 20,
  timeout: true
});

6. All default configuration choices.

$().timedDialog({
  type: 'info',
  title: 'Info',
  body: 'This is the default body text. You might replace this with your own.',
  width: 320,
  height: 240,
  appendTo: 'body',
  closeOnEscape: true,
  closeOnTimer: false,
  timeout: 10, //ten seconds default timeout
  timeoutAnimation: true,
  isModal: true,
  btnDismiss: {
    text: "Dismiss",
    class: '',
  },
  btnConfirm: {
    text: "Confirm",
    action: () => {
        return
    },
    class: '',
  }
});

See Demo And Download

Official Website(armino-dev): Click Here

This superior jQuery/javascript plugin is developed by armino-dev. For extra Advanced Usage, please go to the official website.

Related Posts

VenoBox-Responsive-jQuery-Lightbox-Plugin

Responsive Image Gallery Lightbox jQuery Plugin | VenoBox

VenoBox is a responsive jQuery modal window plugin suitable for images, embedded content, iFrames, Google Maps, Vimeo, and YouTube videos. The big difference compared to many other…

bootstrap-dropdown-on-hover

[Animation] Bootstrap Multi-Level Responsive Dropdown Menu

Bootstrap-based multi-level dropdown navigation menu with cool animations. The dropdown on Hover is a jQuery plugin used to create Bootstrap multi-level scroll-triggered dropdown menus with CSS3 animations…

Google-Translate-Dropdown-Customize-With-Country-Flag

Google Translate Dropdown Customize With Country Flag | GT API

Flag google translates jQuery text that takes advantage of the Google Cloud Translation API to translate web content between languages by selecting a country from the dropdown…

Bootstrap-Fileinput

HTML 5 File Input Optimized for Bootstrap 4.x./3.x with File Preview | Bootstrap Fileinput

bootstrap-fileinput is an improved HTML 5 file input  Bootstrap 5.x, 4.x and 3.x with file preview for different files, provides multiple selections, resumable section uploads, and more….

HStack-and-VStack-in-CSS

CSS Layout Components Horizontal/Vertical Stack | HStack and VStack

HStack and VStack in CSS – CSS layout components that (basically) stack anything horizontally and vertically. A pure CSS library that makes it easy to stack elements…

Floating-Whatsapp-Chat-Button

How to Add Floating Whatsapp Chat Button In HTML | venom-button

Venom Button is a very simple plugin for the jQuery floating WhatsApp button. Adds a floating button to your site that calls WhatsApp Click to Chat API. It will automatically start the WhatsApp…

Leave a Reply

Your email address will not be published. Required fields are marked *