How to hide a div using javascript

后端 未结 6 999
感动是毒
感动是毒 2021-01-26 05:04

I want to hide a div using Javascript. Below is my div.

6条回答
  •  终归单人心
    2021-01-26 05:19

    That's not javascript, but jQuery:

    You can simply use hide() method:

    $(".ui-dialog-titlebar-close").hide(); // you can also use css() method as yours
    

    And you need to wrap your code inside ready handler:

    $(document).ready(function(){
    //your code here
    });
    

    You can learn more about jQuery here.

提交回复
热议问题