I AM EVERYTHING
[jQuery] li의 index값을 알아내어 탭 변경하기 본문
$('.tab-menu li').click(function(){
var index = $(this).index();
$('.tab-menu li').removeClass('active');
$(this).addClass('active');
$('.tab-cont').css('display','none');
$('.tab-cont').eq(index).css('display','block');
});
'programming' 카테고리의 다른 글
[jQuery] 레이어 팝업 바디 스크롤 고정 (0) | 2018.09.17 |
---|---|
[jQuery] 페이지 상단, 하단 이동 (0) | 2018.09.14 |
[jQuery] 스크롤 위 아래 감지하여 헤더 보이기 (0) | 2018.09.03 |
[jQuery] 일정 높이만큼 스크롤시 fixed (0) | 2018.09.03 |
[jQuery] 체크박스 전체 체크, 해제하기 (0) | 2018.08.31 |
Comments