Press "Enter" to skip to content

How to Customizable Right-Click Menu In JavaScript Plugin | CtxMenu

Javascript Context Menu Click – Right-click anywhere on this page to bring up a custom context menu. CtxMenu is a dynamic, customizable context menu plugin to switch the native browser right-click menu.

How to make use of it:

Add the CtxMenu plugin’s JavaScript to the web page.

Create a new context menu for all the web pages.

var contextMenu = CtxMenu();

Add objects along with onClick capabilities, customized icons, checklist index to the context menu.

contextMenu.addItem("Item 1", function(){
  // fired on click

contextMenu.addItem("Item 2", function(){
  // fired on click
},Icon = "icon.png", 3);

Add a separator to the context menu.


You can even connect the context menu to any container component you specify.

var contextMenu = CtxMenu("#myContainer");

How to Add a Custom Right-Click Menu, Context Menu on Right-Click, Change Right-Click Menu Color



  • Fixed typo addSeperator -> addSeparator


  • Fixed a place concern for pages with scrollbars


  • Removed CtxMenuItem class & modified some variables to constants


  • Fixed a difficulty that might break the menu if the web page had scrollbars


  • Added index choice to addSeperator()


  • added min & max width to the picture icon


  • The box-shadow now makes use of rgba as an alternative of hex
  • Fixed components not being detected if it had a number of class names

See Demo And Download

Official Website(nils-soderman): Click Here

This superior jQuery/javascript plugin is developed by nils-soderman. For extra Advanced Usages, please go to the official website.

Be First to Comment

    Leave a Reply

    Your email address will not be published.