This is for a multiple-choice quiz I'm building in a program called Shortstack. The code I'm using displays the answer below the question when a choice is clicked, but I can't get it to nudge the page up to actually show the answer on the page - the only way you know it appears is by scrolling down, but I'd like it to do that automatically.
Here's the code I'm working with:
$(document).ready(function()
{
$(".quiz-choice").click(function ()
{
$(".answer-text").show();
});
});
I found a few solutions which suggested:
$('.answer-text').offset().top = $('.answer-text').offset().top + 5;
and
$(".answer-text").scrollTop();
so I tried placing each of them (at different times) after .show(), but they made no difference.
I'm not really sure what else to try - it feels like it should be a simple thing to do but this is the first time I've tried doing anything with JQuery so I don't know all the functions etc. Thanks in advance for any suggestions!