이전 목록 다음

a페이지에서링크걸어 b페이지가나타나고 b페이지안에 특정부분으로 화면이 이동하는문제

2014-05-16 (금) 19:34:58 6,734
#######  scroll.php페이지  ##################
// scroll.php 페이지안에서 링크연결된 메뉴기능//
<div class="list">
<nav id="menu" class="nav">
<ul>
<li><a href="#" onclick="$('body').animatescroll();" >
<span class="icon"><i aria-hidden="true" class="icon-home"></i></span>
<span class="txt_li">1페이지이동</span> </a>
</li>
<li><a href="#" onclick="$('#section-2').animatescroll();">
<span class="icon"><i aria-hidden="true" class="icon-services"></i></span>
            <span class="txt_li">2번째페이지이동</span></a>
</li>
<li><a href="#" onclick="$('#section-3').animatescroll();">
<span class="icon"><i aria-hidden="true" class="icon-portfolio"></i></span>
<span class="txt_li">3번째페이지이동</span></a>
</li>
.......

</ul>
</nav>
</div>


// scroll.php 페이지안에서 링크된 내용블럭들 
 <div class="main clearfix">
<div id="section-1">1번째 내용  </div>
<div id="section-2">2번째내용</div>
##################################

                        
                            
=======  board.html=========

 <ul>
 <li class="menugo1"><a href='#'>scroll.php페이지내에 1번째 내용이 있는곳으로이동</a></li>
 <li class="menugo2"><a href='#'>scroll.php페이지내에 2번째 내용이 있는곳으로이동</a></li>
....
</ul>
===============================================

질문) scroll.php페이지안에서 '1페이지이동'을 클릭하면 scroll.php페이지안에 '1번째 내용 ' 으로 잘가는데
board.html에서 "scroll.php페이지내에 2번째 내용이 있는곳으로이동" 클릭하면 
scroll.php페이지가나와서  2번째 내용이 있는곳으로이동하는걸 구현하고싶습니다. 

제가 아무리 해볼려 했지만 않되서 물어봅니다.
|

답변 1개 / 댓글 1개

<a href='scroll.php#section-2'>이동</a>
 
이러면 안될까요?

답변에 대한 댓글 1개

scroll.php 이동 조차 않합니다.
scroll.php페이지 자체가 jquery plug in 으로 된것으로 원래 문서 안에서 이동하는 링크는 잘됩니다만.
문제는 scroll.php페이지와 include 않된 다른 문서에서 '클릭하여' scroll.php페이지가 열리고 그 scroll.php페이지안에서 특정 위치로 이동 할려는 겁니다.

답변을 작성하려면 로그인이 필요합니다.