46 lines
916 B
HTML
46 lines
916 B
HTML
<html>
|
|||
|
|
<body>
|
||
|
|
|
||
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
|
||
|
|
<script src="../dist/notify.js"></script>
|
||
|
|
<script src="../dist/styles/notify-bootstrap.js"></script>
|
||
|
|
|
||
|
|
<style type="text/css">
|
||
|
|
.boxes {
|
||
|
|
margin: 150px;
|
||
|
|
}
|
||
|
|
.box {
|
||
|
|
border: thin solid blue;
|
||
|
|
padding: 10px;
|
||
|
|
margin: 20px;
|
||
|
|
width: 100px;
|
||
|
|
}
|
||
|
|
.wrapper {
|
||
|
|
margin-top: 50px
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
|
||
|
|
<div class="boxes"></div>
|
||
|
|
|
||
|
|
<!-- run code -->
|
||
|
|
<script class="demo">
|
||
|
|
|
||
|
|
$.notify.options({
|
||
|
|
autoHide: false
|
||
|
|
});
|
||
|
|
|
||
|
|
var classes = ["error", "success", "warn", "info"];
|
||
|
|
var boxes = $(".boxes");
|
||
|
|
|
||
|
|
$.each(classes, function(i, c) {
|
||
|
|
var box = $("<div class=\"box\">"+c+"</div>");
|
||
|
|
boxes.append($("<div class=\"wrapper\"/>").append(box));
|
||
|
|
|
||
|
|
setTimeout(function() {
|
||
|
|
box.notify(c, {className: c});
|
||
|
|
}, 500)
|
||
|
|
});
|
||
|
|
</script>
|
||
|
|
|
||
|
|
</body>
|
||
|
|
</html>
|