I have a list of questions that users should fill. Questions of type yes or No are those that can shift to another question number depending what is chosen. for example a question in radio button.
- Are your marriage? yes No
$('body,html').animate({scrollTop: $("#"+anyQuestionId).offset().top}, 1000);
I want to scroll to question number 2 if the response is yes and question number 10 when No. This code sample is not taking me to the exact question number.
how can I achieve this in jquery?