• Resolved nationaltradesman

    (@nationaltradesman)


    The Quiz Results button which is labeled “Submit for Scoring” on all our tests, scrolls to the bottom of the page rather than the top where the scoring results are displayed. I suspect this could be annoying to visitors and may affect our sites retention.

    This happens on both iOS and Windows.

    Any help would be apprectiated… Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter nationaltradesman

    (@nationaltradesman)

    Plugin Author Harmonic Design

    (@harmonic_design)

    Hi nationaltradesman,
    some browsers have recently updated how they calculate scroll position. A better and more accurate solution is already in the next version of HD Quiz (hopefully coming out in the next few days!), but in the meantime, you’ll have to do the following.

    edit ./include/js/hdq_script.js inside the HD Quiz plugin and on line 256, you will see a function called hdq_scroll_to_results

    Lines 266 – 271 will show this:

    jQuery(hdq_quiz_container).animate({
    scrollTop: hdq_top
    }, 550);
    jQuery('html,body').animate({
    scrollTop: hdq_top
    }, 550);

    Replace all of that with the following:

    jQuery('html,body').animate({
    scrollTop: jQuery(".hdq_results_wrapper").offset().top + 80
    }, 550);

    I’ve tested that on your site and it should fix the issue for you

    Thread Starter nationaltradesman

    (@nationaltradesman)

    Thank you for that. It is working.

    However when you place this fix into a future update, if there is any way you can have it scroll up just beyond the word “Results”, it would be better for the user. Right now it just scrolls up to the score displayed.

    Again, thanks for your time and fast supporting response.

    Plugin Author Harmonic Design

    (@harmonic_design)

    I actually made a small mistake in the test code I sent you. I had + 80 instead of - 80 ??

    The full code should be

    
    jQuery('html,body').animate({
    scrollTop: jQuery(".hdq_results_wrapper").offset().top - 80
    }, 550);
    

    The new version won’t have that discrepancy

    Thread Starter nationaltradesman

    (@nationaltradesman)

    What has happened?

    All my tests are messed up and multiple choice no longer has switches but check boxes.

    The submit button is no longer there either.

    It was fine after I pasted your code but now is worse.

    Plugin Author Harmonic Design

    (@harmonic_design)

    The updated code I gave you would not affect CSS styling or anything like that.

    Looking at the original link you provided, everything looks fantastic; no issues.

    However, I see that you are using a page cache plugin Endurance Page Cache, so I could be seeing a cached version.

    Try clearing your site cache so I can take a look. Whatever the issue is, it’s almost certainly unrelated to HD Quiz and is caused by some other issues that is stopping plugins from adding assets to pages.

    Thread Starter nationaltradesman

    (@nationaltradesman)

    No its back to normal. Is there an explantaion for this or was it just a glitch? It was only on Windows and not iOS.

    Thanks

    Plugin Author Harmonic Design

    (@harmonic_design)

    It was possibly a glitch, but not with HD Quiz.

    The “glitch” would likely be a temporary one with your caching plugin.

    Caching plugins are extremely complex. My best guess on what happened is that you were looking at the site while the cache plugin was minifying or combining assets (CSS, JS files, etc). Since you were logged in, you’d be seeing the “dynamic” site instead of the “static” site that actual users will see. Once the plugin finished doing its thing, you were able to see the site perfectly again.

    Another possibility is that it could have been a temporary glitch or server hangup where your connection was stopped before the full site could load. HD Quiz loads assets in your theme footer so that HD Quiz never slows your site down. If the server connection failure happened before your footer could load, or a fatal error caused by your theme or another plugin happened, you’d see the questions and stuff but would not see the styling or functionality.

    It could even be local a browser cache glitch – meaning your browser temporarily messed up and corrupted its cache, and simply refreshing the page/clearing your local cache would fix the issue.

    Basically, there are many reasons this could have happened, none actually related to HD Quiz. The good news is that it’s almost certainly a rare and temporary glitch.

    If you see it happen again, try changing cache plugins (I personally love WP Fastest Cache), or even contact your host if the issue ends up being server timeouts.

    Hope this makes sense. Modern servers and the internet can be an interesting beast.

    Thread Starter nationaltradesman

    (@nationaltradesman)

    Ok I must have recieved your latest message to me here as I was submitting my last message thus crossing. Your response time is wicked fast! lol

    So it seems to be fine and I will keep an eye on it. I have cleared cache on hosting and also on my computer and phone. The only other thing that had changed was that I had done a plugin update for Advance Ads.

    I will keep an eye on it as I almost had a heart attack. Im a tradesman much more than a website guy!

    Thanks a bunch again for your fast responses. There is not another plugin that I know of that has this kind of timely support.

    Thread Starter nationaltradesman

    (@nationaltradesman)

    Again must have crossed messaging! Youre too fast!

    Okay thanks again for ALL your info! I will try to digest it!

    JD

    Plugin Author Harmonic Design

    (@harmonic_design)

    Glad to help!

    We are lucky that I’m doing some super late-night work haha ??

    Let me know if it happens again. If I get lucky and see it in action I might be able to advise further (especially if we get lucky that whatever is causing leaves an error code!), but generally speaking, I doubt you will come across this again unless your server is suffering from downtimes – but even that would most likely be a temporary thing

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Quiz Results Not Scrolling to Top’ is closed to new replies.