bootstrap dropdown open on pageload

后端 未结 2 1342
时光取名叫无心
时光取名叫无心 2021-01-21 14:23

Ive got this dropdown styled with bootstrap:

  • 2条回答
    •  無奈伤痛
      2021-01-21 14:39

      This little bit of jQuery script (I'm assuming you've loaded it becasue you're using Bootstrap) ought to do the trick. Once the DOM has loaded, it sends a click() to the dropdown toggle button.

      $(document).ready(function () {
          $("#posuvnik").click();
      });
      

      There is probably a way to do it in straight CSS, but without seeing more of your code it's hard to know.

    提交回复
    热议问题