javascript - prevent bootstrap menu to be opened on specific class or element -


i using dgoguerra's bootstrap-menu. works great except need prevent bootstrap menu opened when right click on specific class or on specific child element.

please see demo. https://jsfiddle.net/8k0zn6ws/2/

i can prevent bootstrap menu opened on 1st , 3rd row prevent menu opened if class label-warning clicked. possible use preventdefault() if specific child element or specific class ( label-warning ) found in selector.

i tried 4 - 5 context menus. 1 worked stable in table.

you can use jquery select expected elements. example:

var menu = new bootstrapmenu('.label-warning', {   fetchelementdata: function($rowelem) {     var rowid = $rowelem.data('rowid');     return demo4rows[rowid];   }, ... 

Comments

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

android - ConstraintLayout: Realign baseline constraint in case if dependent view visibility was set to GONE -