• Resolved gecikabbe

    (@gecikabbe)


    Dear Support,
    I’d like to set a delay (ms) before the user can press the “next” button which leads him to the next question.
    I tried this:
    —————–

    $(function(){
    	setTimeout(function(){ 
          $('.ays_buttons_div').fadeIn();
    //      $('.ays_next').fadeIn();
    	}, 30000);   // milliseconds
      })

    —————–
    But it works only on the first page. Because you are using Ajax, next time it is overwritten by your code.
    Could you please help me how to achieve this?
    I would like to prevent the user clicking on next button fast, a minimal time spent on the actual question is needed.
    Any help would be appreciated.
    Thanks,
    Peter

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Jasmine

    (@hyenokian)

    Hi @gecikabbe,

    Thank you for the topic.

    If you want to set a delay before the user can click on the Next button, you can use this custom JavaScript code.

    (function ($) {
    	$(document).ready(function () {
            $(document).find('.ays_next, .ays_next.start_button').on('click', function(e) {
                $(document).find('.ays-quiz-container .ays_buttons_div').fadeOut();
                setTimeout(function(){ 
                    $(document).find('.ays-quiz-container .ays_buttons_div').fadeIn();
                }, 30000);
            });
    	});
    })( jQuery );
    

    Thank you!

    Thread Starter gecikabbe

    (@gecikabbe)

    Thank you so much dear Jasmine, it works! ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Delay before “next button” appears’ is closed to new replies.