swisnl / jQuery-contextMenu

jQuery contextMenu plugin & polyfill
https://swisnl.github.io/jQuery-contextMenu/
MIT License
2.25k stars 746 forks source link

Add new option parameter menuTitle #591

Closed Knochenmark closed 5 years ago

Knochenmark commented 6 years ago

This allows to pass a string menuTitle that will be set as data-attribute to the contextmenu, which than can be used as css selector to display the menuTitle string as title in the before pseudoelement similar to the examples in the demos. The advantages are that this allows for titles on dynamic created contextmenus and the string can be altered before each creation, which allows for i18n.

Closes #590

Created a gist to showcase the altered css from the demo using the data-attribute: https://gist.github.com/Knochenmark/550c96257266772630245fc35d544068