제이쿼리 질문좀 ㅠㅠ

제이쿼리 질문좀 ㅠㅠ

QA

제이쿼리 질문좀 ㅠㅠ

본문


$(window).scroll(function() {
    var sTop = $(window).scrollTop()
    //대학정보
    if( sTop >= 200 ){
        $(".tab__ul").addClass("min");
        $(".tab__ul").removeClass("wide");
    } else {
        $(".tab__ul").addClass("wide");
        $(".tab__ul").removeClass("min");
    }
});
//대학진학 탭
$(function(){
    $(".tab__li a").click(function (){
        $(".tab__li a").removeClass("on");
        $(this).addClass("on");
        $('html, body').animate({scrollTop:$($(this).attr("href")).offset().top},500);
        return false;
    });
});
//자격증정보
$(function(){
    $(".content__li2:gt(0)").hide()
    $(".tab__ul2 .tab__li a").click(function(){
        var tabIndex = $(this).parent().index();
        $(".content__li2").hide()
        //alert("aa");
        $(".content__li2").eq(tabIndex).show();
    });
    $(".list__title").next("table").hide();
    $(".content__li2 .list__title").click(function(){
        $("table").hide();
        $(this).next("table").slideDown();
    });
});

 

이렇게 해놨는데 ㅠ

 

 

662179180_1553871271.1977.png

이상황입니다 ㅠ

 

도움부탁드릴게요

 

 

이 질문에 댓글 쓰기 :

답변 1

$('html, body').animate({scrollTop:$($(this).attr("href")).offset().top},500);

 

$($(this).attr("href"))

이 부분이 잘못 되었습니다.

 

$(this).offset().top


$('html, body').animate({scrollTop:$(this).offset().top},500);

 

어디 위치로 가고 싶으 신건가요 ?

답변을 작성하시기 전에 로그인 해주세요.
전체 1,013
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT