Bootstrap dropdown with broken datatables

Can you help me, I have a Bootstrap dropdown button to complete Datatable, but when I clicked on it, it doesn’t work. The menu is not displayed.

<div class="btn-group dropdown"> <button class="btn btn-default dropdown-toggle" aria-haspopup="true" aria-expanded="false">Action <span class="caret"></span></button> <ul class="dropdown-menu"> <li><a href="">Edit</a></li> <li><a href="">Delete</a></li> <li class="divider"></li> <li><a href="">Separated link</a></li> </ul> </div> 

enter image description here

+5
source share
2 answers

I added

 $('body .dropdown-toggle').dropdown(); 

And it works for me.

+9
source

Proper bootstrap popup menu formatting according to their website:

 <div class="dropdown"> <a data-toggle="dropdown" href="#">Dropdown trigger</a> <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel"> ... </ul> </div> 

It also depends on which bootstrap.js file will be included on your page, so make sure you have it.

A source:

http://getbootstrap.com/javascript/#dropdowns

+5
source

Source: https://habr.com/ru/post/1203843/


All Articles