Title: Delay before &#8220;next button&#8221; appears
Last modified: October 28, 2021

---

# Delay before “next button” appears

 *  Resolved [gecikabbe](https://wordpress.org/support/users/gecikabbe/)
 * (@gecikabbe)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/delay-before-next-button-appears/)
 * 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](https://wordpress.org/support/users/hyenokian/)
 * (@hyenokian)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/delay-before-next-button-appears/#post-15015414)
 * Hi [@gecikabbe](https://wordpress.org/support/users/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](https://wordpress.org/support/users/gecikabbe/)
 * (@gecikabbe)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/delay-before-next-button-appears/#post-15018386)
 * 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.

 * ![](https://ps.w.org/quiz-maker/assets/icon-256x256.png?rev=2174282)
 * [Quiz Maker by AYS](https://wordpress.org/plugins/quiz-maker/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/quiz-maker/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/quiz-maker/)
 * [Active Topics](https://wordpress.org/support/plugin/quiz-maker/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/quiz-maker/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/quiz-maker/reviews/)

## Tags

 * [delay](https://wordpress.org/support/topic-tag/delay/)
 * [next button](https://wordpress.org/support/topic-tag/next-button/)
 * [time](https://wordpress.org/support/topic-tag/time/)

 * 2 replies
 * 2 participants
 * Last reply from: [gecikabbe](https://wordpress.org/support/users/gecikabbe/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/delay-before-next-button-appears/#post-15018386)
 * Status: resolved