Hiding a div by default

前端 未结 7 1200
半阙折子戏
半阙折子戏 2021-01-01 10:28

I have a div that should be shown only when the user clicks the show button

$(\"div.toshow\").show();

I have written in the body

         


        
7条回答
  •  一向
    一向 (楼主)
    2021-01-01 11:24

    You can use jQuery to change the CSS styles of 'toshow' class adding "display: none". for example

    $(function(){
        $('.toshow').css("display", "none");
    });
    

提交回复
热议问题