1$(document).ready(function () { 2 $.post(routeforgot, { 3 _token: csrf, 4 }).done(function (res) { 5 if (res.status) { 6 console.log("Session removed"); 7 } 8 }); 9 10 $(document).on("change", "#pricingToggle", function () { 11 if ($(this).is(":checked")) { 12 // Yearly selected 13 $(".monthly-label").removeClass("active"); 14 $(".yearly-label").addClass("active"); 15 $(".monthly-plan").hide(); 16 $(".yearly-plan").show(); 17 18 $( 19 ".comparison-table thead tr th:nth-child(3), .comparison-table thead tr th:nth-child(4)" 20 ).hide(); 21 $( 22 ".comparison-table tbody tr td:nth-child(3), .comparison-table tbody tr td:nth-child(4)" 23 ).hide(); 24 25 $( 26 ".comparison-table thead tr th:nth-child(5), .comparison-table thead tr th:nth-child(6)" 27 ).show(); 28 $( 29 ".comparison-table tbody tr td:nth-child(5), .comparison-table tbody tr td:nth-child(6)" 30 ).show(); 31 } else { 32 // Monthly selected 33 $(".yearly-label").removeClass("active"); 34 $(".monthly-label").addClass("active"); 35 $(".yearly-plan").hide(); 36 $(".monthly-plan").show(); 37 38 $( 39 ".comparison-table thead tr th:nth-child(3), .comparison-table thead tr th:nth-child(4)" 40 ).show(); 41 $( 42 ".comparison-table tbody tr td:nth-child(3), .comparison-table tbody tr td:nth-child(4)" 43 ).show(); 44 45 $( 46 ".comparison-table thead tr th:nth-child(5), .comparison-table thead tr th:nth-child(6)" 47 ).hide(); 48 $( 49 ".comparison-table tbody tr td:nth-child(5), .comparison-table tbody tr td:nth-child(6)" 50 ).hide(); 51 } 52 }); 53 54 // Make the monthly/yearly labels clickable and keyboard accessible 55 $(document).on('click', '.monthly-label, .yearly-label', function () { 56 $('#pricingToggle') 57 .prop('checked', function (_, val) { 58 return !val; 59 }) 60 .trigger('change'); 61 }); 62 63 // Allow toggling with Enter or Space when the labels are focused 64 $(document).on('keydown', '.monthly-label, .yearly-label', function (e) { 65 if (e.key === 'Enter' || e.key === ' ') { 66 e.preventDefault(); 67 $(this).trigger('click'); 68 } 69 }); 70 71 // Keep aria-pressed in sync and trigger initial state update 72 function updateAria() { 73 var checked = $('#pricingToggle').is(':checked'); 74 $('.monthly-label').attr('aria-pressed', checked ? 'false' : 'true'); 75 $('.yearly-label').attr('aria-pressed', checked ? 'true' : 'false'); 76 } 77 78 // Update aria when toggle changes 79 $(document).on('change', '#pricingToggle', function () { 80 updateAria(); 81 }); 82 83 // Initialize state on load 84 updateAria(); 85 $('#pricingToggle').trigger('change'); 86}); 87 88const setFreePlan = (plan_id, paypro_id, freePlan = false) => { 89 $.post(routesetPlan, { 90 plan_id: plan_id, 91 paypro_id: paypro_id, 92 _token: csrf, 93 free_plan: freePlan ? "register" : '', 94 }) 95 .done(function (response) { 96 if (response.success) { 97 window.location.href = redirect_url; 98 } 99 }) 100 .fail(function (xhr) { 101 console.error("Error setting session:", xhr); 102 }); 103};
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.