(function() {
document.onmouseover = function () {
event.srcElement.onclick =function(){
if (event.shiftKey) {
event.preventDefault();
event.srcElement.parentNode.removeChild(event.srcElement);return; }
}
}
})();
This version triggers the "Shift + click" function only after double click on empty space of the webpage.
window.addEventListener('dblclick',function() {
document.onmouseover = function () {
event.srcElement.onclick =function(){
if (event.shiftKey) {
event.preventDefault();
event.srcElement.parentNode.removeChild(event.srcElement); return; }
}
}
} , false)
No comments:
Post a Comment