묻고답하기

jQuery 질문

2015.07.16 02:13

boy2

이 jQuery 소스 일반 html에서는 잘 되는데 xe외부페이지로 가져오니까 안 되네요.

var $ = jQuery;  같은 jQuery 충돌 막는 거써봐도 안 되네요 어떻게 하면 쓸 수 있을까요? 

<!DOCTYPE html>
<html>
<head>
<title>가변 높이 처리</title>
<style>
body { height: 100%; margin: 0 0 0 0;}
#header { height: 50px; background-color: #eee; }
#content { background-color: red;}
</style>

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$(document).ready(function() {
resizeContent();
});
$(window).resize(function() {
resizeContent();
});

function resizeContent() {
var windowHeight = $(window).height();
var topHeight = $("#top").height();
$('#content').css({'height':(windowHeight-topHeight)+'px'});
}
</script>
<body>
<div id="header">헤드 높이</div>
<div id="content"><iframe width="100%" height="100%" src="https://www.youtube.com/embed/cmKuGxb23z0" frameborder="0" allowfullscreen></iframe></div>
</body>
<html>

 

태그 연관 글
  1. [2021/07/20] 묻고답하기 사이트맵에서 클릭시 새창열기로 가능한가요? by Alexander *2
  2. [2020/12/16] 묻고답하기 footer 하단에 고정하려면 어딜 수정해야 할까요? by 가입명
  3. [2019/03/27] 묻고답하기 모바일에서만 '권한이 없습니다'가 나오는 이유가 궁금합니다. by Spooky *1
  4. [2017/08/21] 묻고답하기 레이아웃 수정 좀 봐주세요 by 예스24 *2
  5. [2017/08/08] 묻고답하기 메뉴바하고 이미지를 중앙에 고정하고싶어요. by 유자