PageSourceSearch

https://www.getcoverover50.uk/scripts/stepForm/fiftylife.js

js getcoverover50.uk collected 2026-10-04 08:48:41 UTC 6,673 bytes, 134 lines download raw bytes

1$(".advanceStepButton").attr("disabled", !1);
2var t = $(".activeFormStep").first(),
3    e = 100 / $(".form-steps__step").length * (t.data("step") - 1),
4    nextButtonText = $("#nextBtnText").html(),
5    submitButtonText = $("#submitBtnText").html();
6switch ($(".form-progress-bar-width").css("width", Math.ceil(e) + "%"),
7    $(".form-progress-value-value").html(Math.ceil(e)),
8    $("form").hasClass("formSubmitted") && (t.removeClass("activeFormStep"),
9        $(".form-steps__step").last().addClass("activeFormStep"),
10        t = $(".activeFormStep").first()), t.data("step")) {
11            case 1:
12            case 2:
13                $(".advanceStepButton").html("Start My Quote >>").css("display", "none"),
14                $(".lastStepOnly").css("display", "none"),
15                $(".backStepButton").css("display", "none");
16                break;
17            case 3:
18                $(".advanceStepButton").css("display", "none")
19                break;
20            case 4:
21                $('.advanceStepButton').html(nextButtonText + ' <i class="fa-solid fa-circle-chevron-right" style="margin-left: 10px;"></i>').css("display", "block")
22                break;
23            case 5:
24            case 6:
25            case 7:
26                $('.advanceStepButton').html(nextButtonText + ' <i class="fa-solid fa-circle-chevron-right" style="margin-left: 10px;"></i>').css("display", "block"),
27                    $(".lastStepOnly").css("display", "none"),
28                    $(".backStepButton").css("display", "none"),
29                    $(window).width() < 1100 && ($(".form-progress-bar")[0].scrollIntoView(!0), window.scrollBy(0, -30));
30                break;
31            case 8:
32                $(".advanceStepButton").css("display", "none"),
33                    $(".lastStepOnly").css("display", "block"),
34                    $(".lastStepOnly").html(submitButtonText + ' <i class="fa-solid fa-circle-check fa-beat" style="margin-left:10px; --fa-animation-duration: 1.5s;"></i>'),
35                    $(".backStepButton").css("display", "none"),
36                    $(".disclaimer").css("display", "block"),
37                    $(window).width() < 1100 && ($(".form-progress-bar")[0].scrollIntoView(!0), window.scrollBy(0, -30))
38        }
39        if (function() {
40        switch ($(".activeFormStep").first().data("step")) {
41            case 1:
42                var t;
43                    t = function() {
44                    $("input[name='firstStep']:checked").val() ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
45                };
46                t(), $(".firstStep").on("change", function() {
47                    t();
48                    $(".advanceStepButton").click();
49                });
50            break;    
51            case 2:
52                $("html, body").animate({ scrollTop: 0 }, "fast");
53                $(".back-overlay").css("display", "block");
54                $(".form-wrapper").css({
55                    "display":"flex",
56                    "justify-content":"center",
57                    "align-items":"center",
58                    "position":"absolute", 
59                    "top":"0" , "left":"0", 
60                    "width":"100%", 
61                    "height":"100%",
62                });
63                $("#theForm").css({
64                    "max-width":"1200px"
65                });
66                $("#starthere").css("display", "none");
67                var t;
68                    t = function() {
69                    $("input[name='CoverRequiredFor']:checked").val() ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
70                };
71                t(), $(".coverFor").on("change", function() {
72                    t();
73                    $(".advanceStepButton").click();
74                });
75            break;
76            case 3:
77                var t;
78                t = function() {
79                $("input[name='DoYouSmoke']:checked").val() ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
80            };
81            t(), $(".smoking").on("change", function() {
82                t();
83                $(".advanceStepButton").click();
84            });
85            break;
86            case 4:
87            break;
88            case 5:
89                var a = function() {
90                    var postRegex = /[0-9a-zA-Z ]{5,15}/;
91                    $("#postcode").val() && postRegex.test($("#postcode").val()) ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
92                };
93                a(), $("#postcode").on("keyup", function() {
94                    a()
95                });
96                break;
97            case 6:
98                var t = function() {
99                    $("#dobday").val() && $("#dobmonth").val() && $("#dobyear").val() ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
100                };
101                t(), $("#dobday, #dobmonth, #dobyear, #gender").on("change", function() {
102                    t()
103                });
104                break;
105            case 7:
106                var e = function() {
107                    $("#title").val() && $("#firstname").val() && $("#lastname").val() ? $(".advanceStepButton").attr("disabled", !1) : $(".advanceStepButton").attr("disabled", !0)
108                };
109
110                e(), 
111                $("#title").on("change", function() {
112                    e()
113                }),
114                $("#firstname, #lastname").on("keyup", function() {
115                    e()
116                });
117            break;
118            case 8:
119                var n = function() {
120            
121                    var phoneRegex = /^((0|0044|\+44|44)[1]\d{8,9})|^((0|0044|\+44|44)[238]\d{9})|^(((0|0044|\+44|44)[7])[1-9]\d{8})$/i;
122
123                    var emailRegex = /.+\@.+\..+/;
124
125                    $("#LandlinePhone").val() && $("#email").val() && emailRegex.test($("#email").val()) && phoneRegex.test($("#LandlinePhone").val()) ? $(".submitFormButton").attr("disabled", !1) : $(".submitFormButton").attr("disabled", !0)
126                };
127                n(); $("#LandlinePhone, #email").on("keyup", function() {
128                    n()
129                })
130        }
131    }(), $("form").hasClass("formSubmitted")) {
132    e = Math.ceil(100 / $(".form-steps__step").length * ($(".form-steps__step").last().data("step") - 1));
133    $(".form-progress-bar-width").css("width", Math.ceil(e) + "%"), $(".form-progress-value-value").html(Math.ceil(e)), $(".advanceStepButton").css("display", "none"), $(".lastStepOnly").css("display", "block")
134}

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.