localstorage 질문이요 채택완료
morrie
5년 전
조회 1,317
$('button.btn').click(function(){ $('button.btn').removeClass("active"); $(this).addClass("active");
localStorage.setItem("btn", "active"); var lastTab = localStorage.getItem("btn"); });
이렇게 localstorage에 active 상태를 저장했다가 불러오는 방식으로 새로고침시
active 상태를 유지하려고 했는데 유지가 안되서요.
jquery 특정 파일이 필요한건가요?