forked from sugarlabs/musicblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (22 loc) · 741 Bytes
/
script.js
File metadata and controls
29 lines (22 loc) · 741 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
global
$
*/
$(document).ready(function () {
var mode = localStorage.beginnerMode;
var modeIcon = document.getElementById("mode");
var modeText = document.getElementById("modeText");
if (mode === null || mode === "true") {
modeIcon.innerHTML = "star_border";
modeText.setAttribute("data-tooltip", "Switch to advanced mode");
} else {
modeIcon.innerHTML = "star";
modeText.setAttribute("data-tooltip", "Switch to beginner mode");
}
$(".tooltipped").tooltip();
$(".materialize-iso, .dropdown-trigger").dropdown({
constrainWidth: false,
hover: false, // Activate on hover
belowOrigin: true, // Displays dropdown below the button
});
});