cartodb/lib/assets/javascripts/cdb/test/demos/ui/common/notification.html
zhongjin a96ef233c9 cdb
2020-06-15 12:07:54 +08:00

34 lines
765 B
HTML

<!DOCTYPE html>
<html>
<head>
<title>cartodb demo template</title>
</head>
<script id="template" type="text/tmpl">
<p><%= msg %></p>
<a class="close">close</a>
</script>
<body>
<a id="o" href="#open">open</a>
<div id="notification">
</div>
</body>
<script src="../../../src/cartodb.js"></script>
<script>
window.onload = function() {
cdb.load('../../../src/', function() {
var notification = new cdb.ui.common.Notification({
el: $('#notification'),
msg: 'this is a test notification, click on close to close!',
template: $('#template').html()
});
$("#o").click(function() {
notification.open();
});
});
};
</script>
</html>