jQuery plugin that creates a dynamic menu with a triangle pointer based on clip-path
This is a jQuery plugin that creates a dynamic menu with a triangle pointer based on clip-path.
$ npm install triangle-menu --save
Then require it:
If you want to compile the whole package and run unit tests, type
npm install and
triangleMenu(options) where options are not required.
You have to have a certain HTML structure to use it. All the items in the menu have to have
||number||20||Height of the clipped triangle in px|
||number||25||Width of the clipped triangle in px|
||string||.menu-item||Selector of the submenu item|
||function||nothing||The callback function that is called when the mouse hovers over a
You can find the working examples here.
you can add some css to see the effects: