-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfancy.js
29 lines (27 loc) · 890 Bytes
/
fancy.js
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
function myPluginLoadEvent(func) {
opened = false;
// console.log('load');
var btn = document.getElementById('burgermenu');
btn.addEventListener('click', onBtnClick);
btn.classList.remove("opacity0");
}
function onBtnClick(e) {
// console.log('button');
this.classList.remove("paused");
this.classList.toggle('opened');
showHide();
}
function showHide(){
// console.log('show/hide');
var about = document.querySelector('#about');
about.classList.remove("paused");
about.classList.toggle('show');
about.classList.toggle('hide');
}
window.onload = function() {
// console.log('onload');
// pass the function you want to call at 'window.onload', in the function defined above
myPluginLoadEvent(function(){
// your awesome code to run on window.onload
});
}