Answers for "disable click on div"

2

disable click css

.avoid-clicks {
  pointer-events: none;
}
Posted by: Guest on January-13-2021
3

disable div click

// To disable:    
document.getElementById('id').style.pointerEvents = 'none';
// To re-enable:
document.getElementById('id').style.pointerEvents = 'auto'; 
// Use '' if you want to allow CSS rules to set the value
Posted by: Guest on April-11-2020
0

disabled a click

// CSS
.not-active {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
  color: black;
}

// HTML
<a href="link.html" class="not-active">Link</a>
Posted by: Guest on October-29-2020
1

disable right click div

<div>
    This is the Phone and NO ONE SHOULD RIGHT CLICK THIS! >:) </br>
        <img class="tlClogo" src="http://i.imgur.com/0atiS5C.jpg" style="height: 120px; width:120px;">
    </div></br></br></br></br>
    And this is the Keyboard, ofcourse yo can right click this :)</br>
<img src="http://i.imgur.com/xkrKz1X.jpg" style="height: 120px; width:120px;">

$('img').bind('contextmenu', function(e){
    alert("This Logo is protected");return false;
});
Posted by: Guest on November-15-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language