Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 23/11/2024 Black Friday 2024

    BIG SALE, 30% discount for all our extensions. Use BF24 coupon code. Hurry up the discount is valid till 3 December.

  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

Scroll-offeset seems to be ignored
(1 viewing) (1) Guest
"ARI Stream Quiz" WordPress plugin
Go to bottomPage: 12
TOPIC: Scroll-offeset seems to be ignored
#65061
Re:Scroll-offeset seems to be ignored 5 Years, 7 Months ago Karma: 0
Thank you for your answer. Just for your information: The plugin is not working this way on a bigger screen, there it scrolls to the top of the answer section not the explanation section.
I find that way provides better feedback for the user when the wrong answer is given: They also see what is the right answer this way.
I understand that you can't provide just any functionallity that users desire and would like to make the changes myself. Can you point me to any sections of the code where I would best dive into and make the change?
Kidn regards, Petra
Last Edit: 2019/05/28 04:59 By petra.
The administrator has disabled public write access.
 
#65062
Re:Scroll-offeset seems to be ignored 5 Years, 7 Months ago Karma: 760
It seems on a big screen it scrolls to maximum bottom scroll position and it higher than position of explanation area so you see some answers in this case. In other words if not enough content under explanation area then the browser can't scroll to top of explanation area.

Regards,
ARI Soft
Last Edit: 2019/05/28 06:35 By admin.
The administrator has disabled public write access.
 
#65063
Re:Scroll-offeset seems to be ignored 5 Years, 7 Months ago Karma: 760
Open "ARI Stream Quiz -> Settings -> Advanced" page and populate "Custom JS code" parameter with the following code to scroll to answers container instead of explanation area:

Code:


jQuery(function($) {
  setTimeout(function() {
    var quizzes = jQuery('.ari-stream-quiz').ariStreamQuiz();
    if (!quizzes) return;
    if (!(quizzes instanceof Array)) quizzes = [quizzes];
    $.each(quizzes, function(idx, quiz) {
        var scrollTo = quiz.scrollTo;
        quiz.scrollTo = function(el, offset) {
           var $el = $(el);
           if ($el.hasClass('quiz-question-status')) {
              el = $el.parent().find('.quiz-question-answers');
           }

           return scrollTo.call(quiz, el, offset); 
        }
    });
  }, 10);
});



Regards,
ARI Soft
The administrator has disabled public write access.
 
#65065
Re:Scroll-offeset seems to be ignored 5 Years, 7 Months ago Karma: 0
Thank you so much! I am very happy with the support you provide <3
The administrator has disabled public write access.
 
Go to topPage: 12