• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

jQuery 질문

21.05.09 11:57 작성 조회수 89

0

그 질문화면 제이쿼리로 연결하는거 다른 alert는 실행되는데 다음껄로 넘어가지를 않아요... 아무리 강의 돌려봐도 어디가 잘못됬는지 못찾겠어요

function srollup(){
const vheight=$('.test').height();
$('html, body').animate({
scrollTop: ((Math.floor($(window).scrollTop()/vheight)-1)*vheight)
})
}
function scollDown(){
const vheight=$('.test').height();
$('html, body').animate({
scrollTop: ((Math.floor($(window).scrollTop()/vheight)-1)*vheight)
},500)
}
$(function(){
$('.next_btn').click(function(e){
let divs = $(this).parent().prev().children()
let inputs = divs.find('input:checked');
if(inputs.length <1){
alert('문항이 선택되지 않았습니다');
return false;
}
e.preventDefault();
scrollDown();

});
$('.prev_btn').click(function(e){
e.preventDefault();
scrollDown();

});
$('#form').submit(function(){
let radios =$('input[type=radio]:checked');
if(radios.length <3){
alert('문항이 선택되지 않았습니다');
return false;
}
return true;

});
$('html, body').animate({
scrollTop:0

}, 500);
});

답변 1

답변을 작성해보세요.

0

혹시 크롬 브라우저로 110%로 보고 있으신가요?

문제가 넘어가지 않는 이슈가 있어서 강의 하단에 문제를 해결하는 트러블슈팅 강좌를 별도로

편성하였습니다!

혹시 그래도 안되시면 말씀해주세요! :)

Forest님의 프로필

Forest

질문자

2021.05.09

바꾸니까 되네요 감사합니다!!