Disable right click USING JQUERY

<table id="tableID" border=1>
    <tr>
        <td class="disableRightClick">right click disable</td>
        <td>right click</td>
    </tr>
    <tr>
        <td >right click</td>
        <td class="disableRightClick"> no right click</td>
    </tr>
   
</table>


JS FILE

//to disable right click in entire document
//uncomment this to check the rightclick diabled for entire document
/*
$(document).on("contextmenu",function(e){
        alert('right click disabled');
        return false;
    });
*/
//to diable right click in certain element
$('.disableRightClick').on("contextmenu",function(e){
       
        return false;
    });



Comments

Popular posts from this blog

Script For Login, Logout and View Using PHP, MySQL and Bootstrap

PHP Ajax Login Validation Tutorial

Insert CheckBox and Radio button Data in MySQL Database Using PHP