Copy
<script>
$(window).resize(function() {
if($(window).width() < 768) {
$(".section").attr('class','pp-scrollable');
}
});
$(document).ready(function() {
if($(window).width() < 768) {
$(".section").attr('class','pp-scrollable');
}
});
</script>
이렇게 하면 클래스가 변하는데 변하지 않고 추가하려면 어떻게 해야하나요?
답변 1개
2021-02-01 (월) 21:47:56
$(".section").addClass('pp-scrollable'); 로 해결했네요
답변을 작성하려면 로그인이 필요합니다.