02.11.2016, 09:48
Something to start with
CSS
JavaScript
CSS
Code:
.menu {
z-index: 1000;
}
.overlay-left {
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 200px;
background-color: red;
z-index: 999;
}
.overlay-right {
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: 200px;
background-color: blue;
z-index: 999;
}
JavaScript
Code:
$(function(){
var body = $(document.body), el;
// only apply script to user mode visualization
if (!body.hasClass('usermode')) {
return;
}
// create overlay element
el = $('<div></div>').addClass('overlay-left').appendTo(body);
el.on('vclick', function() {
alert('clicked left');
});
// create overlay element
el = $('<div></div>').addClass('overlay-right').appendTo(body);
el.on('vclick', function() {
alert('clicked right');
});
});