0
0

More than 3 years have passed since last update.

bootstrap-selectのshow/hide

Posted at

検証時の環境

  • bootstrap 4.1.3
  • jQuery 3.3.1
  • Chrome 79.0

背景

画面ロード時に,状態に応じてbootstrap-selectの表示/非表示を切り替えたく,

$('#select').show();

のようにしていましたが,反映されたりされなかったりでした.

結果

以下にたどり着きました.
https://stackoverflow.com/questions/44511501/how-do-i-hide-a-bootstrap-select

「bootstrap-selectは内部的に複数のbuttonに変換されるので親要素に対して適用すべし」とのことなので,適用しました.
いまのところうまくいっている様子です.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0