Bootstrap Select - reinitialize on dynamically added element
问题 I'm using Bootstrap Select (http://silviomoreto.github.io/bootstrap-select/) for displaying dropdown with Font-Awesome icons for each section of my website. I added ability to add new sections - when clicked on add button, a new section (duplicate of previous section) is added. In this section, the Bootstrap Select doesn't work. I tried to reinitilize it like: var select = $('[name="section['+ numbersection +'][section_icon]"]'); $(select).selectpicker('destroy'); $(select).selectpicker({