Holla ,
this is the javascript im using
var timeoutID;
function setup() {
document.getElementById("demo").addEventListener("mousedown", resetTimer);
startTimer();
}
setup();
function startTimer() {
timeoutID = window.setTimeout(goInactive, 1000);
}
function resetTimer() {
window.clearTimeout(timeoutID);
goActive();
}
function goInactive() {
document.getElementById("demo").style.opacity = 0;
document.getElementById("demo").style.transition = "1s";
}
function goActive() {
document.getElementById("demo").style.opacity = 1;
document.getElementById("demo").style.transition = "1s";
startTimer();
}
everything is working fine , except i want it to go active only by left mouse button ( now right click left click and middle click are doing the job )
So many thanks in advance AliYous