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

How to understand 2 main() functions after using uftrace to profile the C++ program? -

c# - Update a combobox from a presenter (MVP) -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -