Plugins: Http://www.trendskitchens.co.nz/jquery/contextmenu/jquery.contextmenu.r2.packed.js and/http Www.trendskitchens.co.nz/jquery/contextmenu/jquery.contextmenu.r2.js
Here are a few of the most detailed explanations: http://www.blogjava.net/supercrsky/articles/250091.html and http://my.oschina.net/winHerson/blog/ 131582 and Http://edison87915.iteye.com/blog/1242386
The core is to get a UL list, and then to each Li binding an event, the above several links have been explained very clearly. The following is a record of your own problems this time.
If you have your own event to handle, such as getting the target element of the right mouse button, this time you need to add your own handling of the event in the function behind OnContextMenu, and then return to true, the code is as follows:
1$ ("#div_id"). ContextMenu (' Smallmenu ',{2OnContextMenu:function(e) {3 varobj = E.target;//target of mouse click4 /*then do some specific actions on the target of the mouse click*/5 6 return true;//returns True to display the small menu, returning false to not show the small menu7 },8 ItemStyle:9 {TenFontSize: ' 12px ' One }, A Bindings: - { - ... .... the } - -})
If necessary, you can also change the source code.
jquery Right-click menu ContextMenu using Notes