Initially hiding a div for later display

前端 未结 6 1033
清歌不尽
清歌不尽 2020-12-29 05:24

My web page is like the following:

TEXT, FORMS, and STUFF
6条回答
  •  一个人的身影
    2020-12-29 06:18

    Its best not to add display logic into your mark up a better way to do this would be

    .hidden{ display:none;}
    

    .

    TEXT, FORMS, and STUFF

    .

    $(".stuff").click(function () {
        $(".stuff").addClass('hidden');
        $(this).removeClass('hidden');
    
    });
    

    Hope that helps if your still having rendering issues then maby try

    .hidden{ visibility:hidden; }
    .stuff{display:block;}
    

提交回复
热议问题