0
두 가지 jquery 플러그인을 사용하고 있습니다. 두 가지 모두 잘 작동하지만 어떤 이유로 든 함께 작동하지 못합니다.Jquery 스크롤로 Jquery 전체 화면 이미지
전체 화면 이미지 :
function GotoSection(divid)
{
$('#realBody').animate({scrollTop: $('#' + divid).offset().top}, 300);
}
내 HTML :
<!-- This is the background image -->
<img id="bgimg" src="img/background6.jpg" />
<!-- Here the "real" body starts, where you can put your website -->
<div id="realBody">
<div id="header">
<div class="content">
<img src="img/logo.png" align="left"/>
<ul id="menu">
<li><a id="mhome" name="home" class="selected" onclick="GotoSection('home');">Home</a></li>
</ul>
<div class="clear"></div>
</div>
</div>
<div id="container">
<div id="home" class="seperator"></div>
here is my home content
</div>
</div>
</div>
내 CSS :
#bgimg {
position:absolute;
z-index: -1;
}
#realBody{
position:absolute;
z-index: 5; /* Place the new body above the background image */
overflow:auto; /* restore scrollbars for the content */
height:100%;width:100%; /* Make the new body fill the screen */
top:120px;
}
body
{
height: 100%;
overflow: hidden;
background-color: #ffffff;
padding: 0;
margin: 0;
font-family:'HelveticaLTStdLight';
color:#0f508e;
}
DIV 기능
이
<script type="text/javascript">
var FullscreenrOptions = { width: 1024, height: 439, bgID: '#bgimg' };
// This will activate the full screen background!
jQuery.fn.fullscreenr(FullscreenrOptions);
</script>
스크롤
스크롤이 엉망입니다. 내가 보내는 div에는 가지 않습니다. 내 오류가이 줄에 있다고 생각합니다 :
$('#realBody').animate({scrollTop: $('#' + divid).offset().top}, 300);
그러나 내가 무엇을 변경해야하는지 확실하지 않습니다.