using bootstrap-select jQuery plug-in - won't drop down
Permalink
Trying to use the bootstrap-select control (slick <select> wrapper jQuery plug-in) for some select HTML controls, and they behave properly when I'm logged in as editor. However, they don't drop down when clicked while I'm signed out.
I am calling the $(s).selectpicker( ); function within a $(document).ready( ) block, and have the bootstrap-select css and js files in the document head, but cannot easily see what dependency might be different when logged in and out.
Current page where problem exists (for now):
http://www.webspinner.ca/concrete5/index.php/concrete/concrete-calc...
I am calling the $(s).selectpicker( ); function within a $(document).ready( ) block, and have the bootstrap-select css and js files in the document head, but cannot easily see what dependency might be different when logged in and out.
Current page where problem exists (for now):
http://www.webspinner.ca/concrete5/index.php/concrete/concrete-calc...
Thanks, but I have actually used the RegisterAssets and RequireAssets to include jQuery and the bootstrap-select css and js files. Viewing the page source I can see them in the document head section, which is why I'm perplexed at why this is failing.
I've had bootstrap-select work on another standalone non-Concrete5 page, but failing in Concrete5.
I've had bootstrap-select work on another standalone non-Concrete5 page, but failing in Concrete5.
Can't help you much without actually degugging it, you could try to include your own version of bootstrap in case the components were customized by the developers. Also be sure to use the bootstrap API for the version that's included with c5, which is 2.3 if I am not mistaken.
Thanks for the suggestions - were on the right track, as I guess no bootstrap js files were included, so I needed bootstrap/dropdown.js as an asset. I'm tempted to include the whole bootstrap.min.js since it's pretty small. BTW, I'm using 5.7, so the included Bootstrap is 3.3.6.
So, problem solved. Thanks for your input!
So, problem solved. Thanks for your input!
You need to include these assets manually to make them available when the UI is not loaded. Typically you'd do that in the registerAssets function in your page_theme.php file.