본문 바로가기
웹퍼블리싱/jquery

[제이쿼리] hasclass / 클릭했을때 if 특정 영역이 아니면 이벤트 발생 시키기

by developsigner 2018. 11. 7.

    $('html').click(function(e) { if(!$(e.target).hasClass("특정클래스명")) {

    

    console.log("영역밖입니다");

     

       } }); 


출처

http://chobokkiri.tistory.com/67

반응형

댓글