$(document).ready(function ($) { $('body .description-form').on( 'change', '.gchoice input[type="radio"]', function () { if ($(this).is(':checked')) { $(this) .closest( '.gform_page:nth-child(1),.gform_page:nth-child(2),.gform_page:nth-child(3)', ) .find('.gform_next_button') .click(); } }, ); });