링크 이동 문제 조언 좀 부탁드리겠습니다ㅠ
본문
<!-- 탭 메뉴 -->
<div class="liveEdtap">
<ul>
<li><a href="#1" data="1">업체</a></li>
<li><a href="#2" data="2">교육</a></li>
<li><a href="#3" data="3">신청서</a></li>
</ul>
</div>
<!-- 신청서 폼 -->
<div class="liveEdtapCon" id="3">
<?php include_once(G5_BBS_PATH."/register2.php");?>
</div>
<!-- 동작 -->
<script>
$(document).ready(function(){
$(".liveEdtapCon").hide();
$(".active").show();
$("div.liveEdtap > ul > li > a").click(function(){
$(".liveEdtap > ul > li").removeClass("active");
$(".liveEdtapCon").removeClass("active");
$(this).parent().addClass("active");
$("#"+$(this).attr("data")).addClass("active");
$(".liveEdtapCon").hide();
$(".active").show();
return false;
});
});
</script>
이렇게 있는데
해당문서 파일이 homepage.com/mypage.php 라고하면
homepage.com/mypage.php#3 URL을 직접 입력 하면 신청서 탭에 가고싶은데
그게안되네요 ㅠㅠ
탭을 클릭해도 #은 안뜨고 homepage.com/mypage.php URL만 떠요..ㅠ
조언좀 부탁드릴게요
답변 1
http://benalman.com/code/projects/jquery-hashchange/examples/hashchange/#test4
jquery hashchange event 플러그인 이용해보세요.