jQuery 연산

bird.j·2021년 2월 16일
0

web기본

목록 보기
8/19

jquery, javascript 콘솔창에다가 찍어보면서 하나하나 확인

이렇게 해야지 에러가 어디서 났는지도 알기 쉬움
=> console.log(내용)

function openclose(){
            let status = $('#post-box').css('display');
            console.log(status);
            if(status == 'block'){
                $('#post-box').hide();
                $('#btn-posting-box').text('포스팅박스 열기');

            }else{
                $('#post-box').show();
                $('#btn-posting-box').text('포스팅박스 닫기');
            }
        }

0개의 댓글