Files
jquery-notify/examples/position.html
T

43 lines
848 B
HTML
Raw Permalink Normal View History

2013-05-29 16:59:19 +10:00
<html>
<body>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<script src="../dist/notify.js"></script>
<style type="text/css">
2013-05-30 16:35:16 +10:00
.boxes {
margin: 150px;
}
.box {
border: thin solid blue;
2013-05-31 13:18:43 +10:00
padding: 10px;
margin: 20px;
2013-05-30 16:35:16 +10:00
width: 100px;
}
.wrapper {
margin-top: 50px
}
2013-05-29 16:59:19 +10:00
</style>
<div class="boxes"></div>
<!-- run code -->
<script class="demo">
var positions = ["top", "right", "bottom", "left"];
var boxes = $(".boxes");
2013-06-06 14:03:15 +10:00
$.notify.defaults({ arrowShow: false })
$(function() {
$.each(positions, function(i, p) {
var box = $("<div class=\"box\">"+p+"</div>");
boxes.append($("<div class=\"wrapper\"/>").append(box));
2013-06-03 09:15:58 +10:00
box.notify(p, {position: p+" center"});
2013-06-06 14:03:15 +10:00
});
2013-05-29 16:59:19 +10:00
});
</script>
</body>
</html>