jQuery Right Mouse Plugin Demo

This plugin enables you to detect events triggered by the right mouse button. There is also a built-in method to disable browser context menus.

Back to the project page

Usage

$(document).ready( function() {
	
	// Capture right click
	$("#selector").rightClick( function(el) {
		// Do something
	});
	
	// Capture right mouse down
	$("#selector").rightMouseDown( function(el) {
		// Do something
	});
	
	// Capture right mouseup
	$("#selector").rightMouseUp( function(el) {
		// Do something
	});
	
	// Disable context menu on an element
	$("#selector").noContext();
	
});

Demo

This container will capture right mouse clicks
This container will capture right mouse up and down
-- click log --
No context menu in this container