Click Actions
$(document).ready(function(){
$( "div" ).click(function() {
$( this ).toggleClass( "class-one" );
//alert('left click');
});
});
Mouse Clicks
$(document).ready(function(){
$( "div" ).click(function() {
$( this ).toggleClass( "class-two" );
//alert('Right Click');
});
});
My goal is to use Jquery to add a class on left click and another class on right click. The left click functionality is working, but the right click class addition is not functioning properly.
Is it possible to add a class on right click using Jquery?