blob: 9a26ed13feb2531db03c0a792e72a1a5b6891729 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<title>Hint demo</title>
<meta charset="utf-8" />
<script src="../js/lib/require.js" async="async"></script>
<link type="text/css" rel="stylesheet" href="../css/kalamar.css" />
</head>
<body>
<nav id="mainButton" style="position: absolute; top: 300px"></nav>
</body>
<script>
requirejs.config({
baseUrl: '../js/src',
paths : {
'lib': '../lib'
}
});
require(['buttongroup'], function (btnClass) {
btns = btnClass.create();
btns.add('Meta',['meta'], function () {
console.log(this.button.classList.contains('meta'));
});
var list = btns.addList('More', ['list']);
list.readItems([
['cool', 'cool', function (e, action) { console.log('really' + this.action()) }],
['very cool', 'veryCool', function (e, action) { console.log('very cool') }]
]);
document.getElementById('mainButton').appendChild(btns.element());
});
</script>
</html>