$(document).ready(function(){ //popup $('.popBtn').click(function(){ $('.popUp').addClass('active'); return false; }) $('.popUp .close').click(function(){ $('.popUp').removeClass('active'); }) /* $(document).click(function(e){ if( $('.popUp').hasClass('active') ){ if(e.target.className =="popUp"){ return false; } //내가 클릭한 요소(target)를 기준으로 상위요소에 .share-pop이 없으면 (갯수가 0이라면) console.log() $('.popUp').removeClass('active'); } }); */ $('.popUp').click(function(event) { if($(event.target).is('.active')) { //처리 $('.popUp').removeClass('active'); } }); //location $('.subPage-nation button').click(function(){ $(this).parent().toggleClass('on').siblings().removeClass('on') }) //footerBtn $('.fs button').click(function(){ $('.fs>ul').toggleClass('on') }) //fillter $('.bwWrapper').BlackAndWhite({ hoverEffect : true, // default true // set the path to BnWWorker.js for a superfast implementation webworkerPath : false, // to invert the hover effect invertHoverEffect: false, // this option works only on the modern browsers ( on IE lower than 9 it remains always 1) intensity:1, // this option enables/disables the attribute crossorigin=anonymous on image tags. Default true. // please refer to https://github.com/GianlucaGuarini/jQuery.BlackAndWhite#important crossOrigin: true, speed: { //this property could also be just speed: value for both fadeIn and fadeOut fadeIn: 200, // 200ms for fadeIn animations fadeOut: 800 // 800ms for fadeOut animations }, onImageReady:function(img) { // this callback gets executed anytime an image is converted } }); })