I am dynamically adding select
elements in the webpage when a certain action is taken by the user. The problem is that as the select elements are added dynamically, the jquery
is unable to make them searchable as it is applied when the document is loaded. How can I make the dynamically added select boxes searchable?
EDIT
I'm using select bootstrap for making the select element searchable.
What I am doing is making the user select multiple parts of an image using select areas and whenever an area is selected, I add a select element corresponding to that area. This is done using a custom javascript in the head of the page. However, these select elements are devoid of any styling as the are added dynamically.
The select bootstrap can make a select element searchable by using data-live-search
-
<select data-live-search="true" name="category_name" class="selectpicker" >