jquery Right-click menu ContextMenu using Notes

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.