Files
jquery-notify/examples/position.html
T
2013-06-06 14:03:15 +10:00

44 lines
909 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">
var positions = ["top", "right", "bottom", "left"];
var boxes = $(".boxes");
$.notify.defaults({ arrowShow: false })
$(function() {
$.each(positions, function(i, p) {
var box = $("<div class=\"box\">"+p+"</div>");
boxes.append($("<div class=\"wrapper\"/>").append(box));
box.notify(p, {position: p+" center"});
});
});
</script>
</body>
</html>