팝업창 띄우는 것에 대한 질문 드립니다. 채택완료
위치를 어디에 넣어야할지 모르겠어요...
</p><p><script type="text/javascript"></p><p>window.open("<a href="<a href="http://placehold.it/691x377" target="_blank" rel="noopener noreferrer">http://placehold.it/691x377</a>"><a href="http://placehold.it/691x377" target="_blank" rel="noopener noreferrer">http://placehold.it/691x377</a></a>","imeji","toolbar=no,width=691,height=377,top=0,left=0");</p><p></script> </p><p>
이렇게 하면 새창으로 뜨고 되긴 하지만 저는 이 방식보다
</p><p><!DOCTYPE HTML></p><p><html lang="ko-KR"></p><p><head></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><meta charset="utf-8"></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><title></title></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><style type="text/css"></p><p><span class="Apple-tab-span" style="white-space:pre"> </span>.layer-box{width:691px;height:377px;position:absolute;top:200px;left:50%;margin-left:-345px;}</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>.layer-box .btn-close{display:block;width:140px;height:30px;border:1px solid #000;position:absolute;left:540px;top:7px;cursor:pointer;}</p><p><span class="Apple-tab-span" style="white-space:pre"> </span></style></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><script src="<a href="<a href="http://code.jquery.com/jquery-latest.min.js" target="_blank" rel="noopener noreferrer">http://code.jquery.com/jquery-latest.min.js</a>"><a href="http://code.jquery.com/jquery-latest.min.js" target="_blank" rel="noopener noreferrer">http://code.jquery.com/jquery-latest.min.js</a></a>"></script></p><p><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: 1.5;"></head></span></p><p><body></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><div class="layer-box"><img src="<a href="<a href="http://placehold.it/691x377" target="_blank" rel="noopener noreferrer">http://placehold.it/691x377</a>"><a href="http://placehold.it/691x377" target="_blank" rel="noopener noreferrer">http://placehold.it/691x377</a></a>" alt="" /></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><span class="btn-close"></span></p><p><span class="Apple-tab-span" style="white-space:pre"> </span></div></p><p><span class="Apple-tab-span" style="white-space:pre"> </span><script></p><p><span class="Apple-tab-span" style="white-space:pre"> </span> $(function() {</p><p><span class="Apple-tab-span" style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: 1.5; white-space: pre;"> </span><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: 1.5;">$( ".layer-box span.btn-close" ).click(function(){</span></p><p><span class="Apple-tab-span" style="white-space:pre"> </span>$(this).parent().hide()</p><p><span class="Apple-tab-span" style="white-space:pre"> </span>})</p><p><span class="Apple-tab-span" style="white-space:pre"> </span> });</p><p> </script></p><p></body></p><p></html> </p><p>
이렇게 쓰고 싶습니다. head.php와 index.php에 넣어보았는데 인덱스에 넣으니 뜨지 않고
헤드에 넣으니.. 팝업창은 뜨지만 밑에 제이쿼리 슬라이더가 깨집니다ㅠㅠ 어떻게 해야할까요?
답변 5개
jquery가 include되어 충돌이 일어나는거 같은데
index.php파일에 include_once('./_head.php');
위 코드 상단에 원하시는 코드를 한번 넣어보세요
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
IE에서도 마찬가지로 F12누르시면 개발자 도구 나옵니다.
거기에서 스크립트 탭을 클릭하시고 디버깅 시작을 눌러주세요.
그리고 콘솔에서 스크립트 에러 확인 해보시고..
나중에 디버깅 중지 하시고.
스크립트에러를 고치시면 잘 되실듯 하네요 ^^
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
그러면 아마 클릭이벤트가 바인드 되기 전에
스크립트 에러가 나서 그럴거예요..
$(function() 는 의미가 onready 라서요..
페이지가 다 로딩된다음에 클릭이벤트가 적용되는건데
그전에 스크립트 에러가 있으면 안될수 있습니다.
크롬에서 f12 누르셔서.. 콘솔에서 스크립트 에러 확인해보세요
답변에 대한 댓글 1개
크롬에서는 정상적이예요!
근데 IE에서는 안되고 밑에 콘텐츠들도 에러가 나는 등 여러 문제가 생기네요ㅠㅠㅠ
댓글을 작성하려면 로그인이 필요합니다.
</strong><code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;"><span </code><code class="keyword" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; font-weight: bold !important; color: rgb(0, 102, 153) !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">class</code><code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">=</code><code class="string" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; color: blue !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">"btn-close" id="btn_close_layerpopup"</code><code class="plain" style="line-height: 23.5440006256104px; margin: 0px !important; padding: 0px !important; border: 0px !important; outline: 0px !important; float: none !important; vertical-align: baseline !important; position: static !important; left: auto !important; top: auto !important; right: auto !important; bottom: auto !important; height: auto !important; width: auto !important; font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace !important; background-image: none !important; background-attachment: initial !important; background-color: rgb(248, 248, 248); background-size: initial !important; background-origin: initial !important; background-clip: initial !important; background-position: initial !important; background-repeat: initial !important;">></span></code><span style="line-height: 1.5; font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif;"></span><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);"></strong><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);">
이렇게 바꾸고..
</strong><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: normal;"></span><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif; line-height: normal;"><script></span></p><pre style="line-height: normal;"> $(function() {
$( "#<span style="color: rgb(0, 0, 255); font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace; line-height: 23.5440006256104px; background-color: rgb(248, 248, 248);">btn_close_layerpopup</span><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif;"></span><span style="font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif;">" ).click(function(){</span></pre><pre style="line-height: normal;"> $(this).parent().hide();
})
}); </pre><p><span style="line-height: normal; font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif;"></script></span><span style="line-height: 1.5; font-family: 굴림, Gulim, 돋움, Dotum, Helvetica, sans-serif;"></span><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);"></strong><strong style="font-family: 돋움, dotum, helvetica; font-size: 12px; line-height: 21.6000003814697px; background-color: rgb(255, 255, 255);">
이렇게 바꿔보세요
답변에 대한 댓글 1개
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
define('_INDEX_', true);
include_once('./_common.php');
// 초기화면 파일 경로 지정 : 이 코드는 가능한 삭제하지 마십시오.
if ($config['cf_include_index']) {
if (!@include_once($config['cf_include_index'])) {
die('기본환경 설정에서 초기화면 파일 경로가 잘못 설정되어 있습니다.');
}
return; // 이 코드의 아래는 실행을 하지 않습니다.
}
if (G5_IS_MOBILE) {
include_once(G5_MOBILE_PATH.'/index.php');
return;
}
include_once('./_head.php');
?>
여기 위에 말씀하시는 거 맞죠? 넣어봤는데 뜨긴해요!!
슬라이드로 가려져서 z-index값을 높여줬더니 뜹니다.
그런데 저 제가 span으로 준 버튼이 안되는데 그건 왜 그럴까요ㅠㅠㅠ