126
rated 0 times
[
129]
[
3]
/ answers: 1 / hits: 24179
/ 10 Years ago, wed, january 21, 2015, 12:00:00
This is my sample code:
html
<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;>
js
$('img').bind('contextmenu', function(e){
alert(This Logo is protected);return false;
});
I want no one to be able to right click the 1st picture (cellphone) but other than that(keyboard) should be able to right click.
PS: I know this can be overriden by browsers but its okay :)
More From » jquery