Skip to content

AsAlertMessage is a simple, sweet, customizable, animated modal plugin used to replace the default alert / prompt / confirm dialog boxes. AsAlertMessage is independent of jquery

License

Notifications You must be signed in to change notification settings

ahmadsopyan9/as-alert-message

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

as-alert-message

AsAlertMessage is a simple, sweet, customizable, animated modal plugin used to replace the default alert / prompt / confirm dialog boxes. AsAlertMessage is independent of jquery

See Demo Here

Usage

<link href="css/as-alert-message.min.css" rel="stylesheet">
<script src="js/as-alert-message.min.js"></script>
//or using cdn
<link href="https://cdn.isfidev.com/asalertmessage/v1.0/css/as-alert-message.min.css" rel="stylesheet">
<script src="https://cdn.isfidev.com/asalertmessage/v1.0/js/as-alert-message.min.js"></script>

Example Code

Create Basic Alert

asAlertMsg("hey test text");

Alert automatically close

asAlertMsg({
  type: "success",
  title: "Title message",
  message: "Text message"
});

Alert with button to close

asAlertMsg({
  type: "success",
  title: "Title message",
  message: "Text message",
  button: {
  	text: "Title Button",
  	bg: "success"
  }
});
//for button
//default {}
//text & bg, is optional

Alert with button to redirect

asAlertMsg({
  type: "success",
  title: "Title message",
  message: "Text message",
  button: {
  	text: "Title Button",
  	bg: "success"
  },
  success: {
	redirect: ["https://google.com"]
  }
});

Alert with automatically redirect

asAlertMsg({
  type: "success",
  title: "Title message",
  message: "Text message",
  timer: 1000,
  success: {
	redirect: ["https://google.com"]
  }
});
//for this timer parameter the optional
//default is 1500

If you want to redirect to a new tab, add "_blank" to the redirect parameter value, like this

redirect: ["https://google.com","_blank"]

About

AsAlertMessage is a simple, sweet, customizable, animated modal plugin used to replace the default alert / prompt / confirm dialog boxes. AsAlertMessage is independent of jquery

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages