Title: Adding JavaScript to Next Button
Last modified: August 22, 2016

---

# Adding JavaScript to Next Button

 *  [Asitha](https://wordpress.org/support/users/asitha/)
 * (@asitha)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/adding-javascript-to-next-button/)
 * I have added the following code to my custom js file:
 * (function($) {
    $(‘.nextQuestion’).click(function(){ console.log(‘test’); }) })(
   jQuery );
 * But whenever I click on the next button on the quiz, it doesn’t seem to run. 
   Is there something I’m missing to have this script execute on the next button
   click?
 * [https://wordpress.org/plugins/slickquiz/](https://wordpress.org/plugins/slickquiz/)

The topic ‘Adding JavaScript to Next Button’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/slickquiz_ebf6fc.svg)
 * [SlickQuiz](https://wordpress.org/plugins/slickquiz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/slickquiz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/slickquiz/)
 * [Active Topics](https://wordpress.org/support/plugin/slickquiz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/slickquiz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/slickquiz/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Asitha](https://wordpress.org/support/users/asitha/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/adding-javascript-to-next-button/)
 * Status: not resolved