How do I hide an HTML element before the page loads using jQuery

前端 未结 7 1320
独厮守ぢ
独厮守ぢ 2020-12-07 20:44

I have some JQuery code that shows or hides a div.

$(\"div#extraControls\").show();   // OR .hide()

I initially want the div to be not visi

7条回答
  •  一生所求
    2020-12-07 21:16

    #toggleMe //Keep this in your .css file
    {
    display:none;
    visibility:inherit;
    background-color:#d2d8c9;    
    }
    
    
     Expand Me
     ///this way u can make a link to act like a button too
    
     
    //this will be hidden during the page load //your elements
    ///if you decide to make it display on a click, follow below: //make sure u include jquery.js file in ur project ///Now for every alternate click, it shows and hides, but during page load; its hidden. //Hope this helps you guys ...

提交回复
热议问题