<script type="text/javascript" src="js/jquery_v_1.4.js"></script>
<script type="text/javascript" src="js/jquery_notification_v.1.js"></script>
<link href="css/jquery_notification.css" type="text/css" rel="stylesheet"/>
showNotification();
showNotification({
message: "This is a sample Success notification",
type: "success"
});
Demo:
showNotification({
message: "This is a sample Error notification!",
type: "error"
});
Demo:
showNotification({
message: "This is a sample Warning notification",
type: "warning"
});
Demo:
showNotification({
type : "information",
message: "This is a sample Warning notification"
});
Demo:
showNotification(){
message: "This is Auto Close notification. Message will close after 2 seconds",
autoClose: true,
duration: 2
}
Demo:
showNotification(){
message: "This is Auto Close notification. Message will close after 2 seconds",
autoClose: true,
duration: 2
}
Demo:
$.ajax({
type: "POST",
data: post_parmas,
url: "sample.php",
error: function (msg) {
// Error occurred in sending request
showNotification({
message: "Oops! an error occurred.",
type: "error" // type of notification is error
autoClose: true, // auto close to true
duration: 5 // display duration
});
},
success: function (msg) {
showNotification({
message: "Show Ajax result message here!",
type: "error" // type of notification is error/success/warning/information,
autoClose: true, // auto close to true
duration: 5 // message display duration
});
}
});
<?php
if (isset($_GET["type"])) {
$message = $_GET["message"];
$type = $_GET["type"];
?>
<script type="text/javascript">
showNotification({
message: "<?php echo $message; ?>",
type: "<?php echo $type; ?>",
autoClose: true,
duration: 5
});
</script>
<?php
}
?>