• Shortcodes Ultimate version 4.9.9, Google Chrome 56, Firefox 51, Edge 38, IE 11.

    I tried to search for any existing items for this topic and only found the closed item about 3 years ago, so I hope it’s right to post it as a new topic.

    Spoilers on my site are not scrolling when they are clicked to open them. So clicking on a spoiler title at the bottom of the screen, the spoiler opens below the screen so actually no change can be seen, and the user does not know to scroll up manually. Basically, there is no scrolling at all on opening spoilers.

    I changed this line (line 13) in other-shortcodes.js:

    if ($(window).scrollTop() > $title.offset().top) $(window).scrollTop($title.offset().top - $title.height() - bar);

    by removing the test, leaving just:

    $(window).scrollTop($title.offset().top - $title.height() - bar);

    and the result is that the scroll works perfectly as far as I can see. I’m afraid I’m not knowledgeable enough to be able to examine why the test is always not true.

    In order that I can at least add some value, scrolling can be animated if line 13 is replaced with:

    window.setTimeout(function () {
     $('html, body').animate({ scrollTop: $title.offset().top - bar -  $title.height()}, 'slow');
     }, 100);

    Thank you for an excellent plugin with many useful shortcodes!

  • The topic ‘Accordion / Spoiler scroll not working’ is closed to new replies.