Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

d.stopPropagation is not a function on bootstrap select-picker

I have an issue on my site, the select picker works fine a lot of time, but without making any changes on the code, the select-picker stopped working.

The error is:

bootstrap-select.min.js:7 Uncaught TypeError: d.stopPropagation is not a function

I already tried updating the version of the library, but all the versions I tried (1.10, 1.7, 1.6 and 1.5) looks with the same issue.

Can you bring me some ideas of what's happening? If you can see the console on the website would be awesome.

like image 474
rleiva Avatar asked Jun 22 '16 17:06

rleiva


1 Answers

Be sure the selectpicker is fully initialized before setting the value:

$('.selectpicker').selectpicker();
$('.selectpicker').selectpicker('val', 'All');
like image 107
xusj Avatar answered Oct 31 '22 23:10

xusj