풀 페이지 사이드 네비 문의드립니다 채택완료
권혜린
1년 전
조회 2,525
안녕하세요
풀페이지 관련 사이드 네비 질문드립니다.
http://sir.kr/data/editor/2401/3034737284_1704386700.415.png" />
현재 작업중인 주소입니다
https://altech.gabia.io/index.php#main
http://sir.kr/data/editor/2401/3034737284_1704386712.1839.png" />
https://www.lotte.co.kr/main.do#firstPage
옆 사이드 네비처럼 동그라미를 마우스 오버시 메뉴가 나오게
하고싶은데 아무리 해도 어떻게 해야할지 모르겠습니다 ㅠㅠㅠ
제발 도와주세여1
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
1년 전
</p>
<p>$(function () {
$('#fp-nav a').on('mouseenter', function () {
$(this).closest('ul').find('a').removeClass('active');
$(this).addClass('active');
});
$('#fp-nav a').on('mouseleave', function () {
$(this).removeClass('active');
});
});</p>
<p>
로그인 후 평가할 수 있습니다
답변에 대한 댓글 2개
�
권혜린
1년 전
안녕하세요! 답변 너무 감사합니당. 수정했더니 마우스오버하면 메뉴가 나오는데 마우스를 떼면 원래 있던 현재페이지의 메뉴도 함께 사라지는데 어디가 잘못된걸까요ㅠㅠ
�
배르만
1년 전
현재페이지 메뉴를 유지해야 한다면 다음처럼 시도해볼수 있습니다.
[code]
$(function () {
$('#fp-nav a').on('mouseenter', function () {
if (this.href.endsWith(location.hash) == true) { return; }
//$(this).closest('ul').find('a').removeClass('active');
$(this).addClass('active');
});
$('#fp-nav a').on('mouseleave', function () {
if (this.href.endsWith(location.hash) == true) { return; }
$(this).removeClass('active');
});
});
[/code]
[code]
$(function () {
$('#fp-nav a').on('mouseenter', function () {
if (this.href.endsWith(location.hash) == true) { return; }
//$(this).closest('ul').find('a').removeClass('active');
$(this).addClass('active');
});
$('#fp-nav a').on('mouseleave', function () {
if (this.href.endsWith(location.hash) == true) { return; }
$(this).removeClass('active');
});
});
[/code]
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인