1jQuery(document).ready(function ($) { 2 3 // Disable the default page scroll on WPForms 4 window.wpforms_pageScroll = false; 5 6 // Animate the range slider with color 7 $('.wpforms-container.online-mortgage-form .wpforms-field-number-slider input').each(function () { 8 9 const $range = $(this); 10 11 function setRangeStyle($el) { 12 const percent = (($el.val() - $el.attr('min')) * 100) / ($el.attr('max') - $el.attr('min')); 13 $el.css('--val', percent + '%'); 14 } 15 16 setRangeStyle($range); 17 $range.on('input', function () { 18 setRangeStyle($(this)); 19 }); 20 21 }); 22 23 24 // Add animation class for prev / next form page navigation 25 let previousPage = 1; 26 $( '.wpforms-container.online-mortgage-form form.wpforms-form' ).on( 'wpformsPageChange', function (e, nextPage, $form) { 27 28 const animationClass = nextPage < previousPage ? 'slideInLeft' : 'slideInRight'; 29 30 $('.wpforms-container.online-mortgage-form .wpforms-field-container .wpforms-page').removeClass('slideInRight slideInLeft animated'); 31 $('.wpforms-container.online-mortgage-form .wpforms-field-container .wpforms-page.wpforms-page-' + nextPage).addClass(animationClass + ' animated'); 32 33 previousPage = nextPage; 34 35 }); 36 37 // Load next page on radio button click 38 const form = $('.wpforms-container.online-mortgage-form.vdwpfe-auto-advance'); 39 form.on('click', 'input[type="radio"]', function (e) { 40 setTimeout(() => { 41 const nextButton = $(this).parents('.wpforms-page').find('.wpforms-page-button.wpforms-page-next'); 42 if (nextButton.length && !nextButton.prop('disabled')) { 43 nextButton.click(); 44 } 45 }, 100); 46 }); 47 48 $('.wpforms-container.online-mortgage-form.vdwpfe-auto-advance').find('.wpforms-page').each(function () { 49 if ($(this).find('input[type="radio"]').length > 0) { 50 $(this).find('.wpforms-field-pagebreak .wpforms-page-next').hide(); 51 } 52 }); 53 54 $('.wpforms-container.online-mortgage-form').find('.wpforms-field').each(function () { 55 if ($(this).find('.wpforms-image-choices').length > 0) { 56 $(this).addClass('has-image-choices'); 57 } 58 }); 59 60} );
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.