PageSourceSearch

https://dst-waac.netlify.app/assets/js/index.js

js dst-waac.netlify.app collected 2026-10-03 10:40:03 UTC 6,128 bytes, 175 lines download raw bytes

1
2//initialize wow.js
3$( document ).ready(function() {
4    new WOW().init();
5});
6  
7
8//dispose preloader
9$(window).on('load', function() {
10    $('#loading').delay(500).fadeOut(300);
11
12var popupTimer=  setTimeout(() => {
13    const myModal = new bootstrap.Modal(document.getElementById('modalSubscriptionForm'))
14    myModal.show();
15
16  }, 6000);
17
18
19  $("#modalSubscriptionForm").on('hidden.bs.modal', function(){
20    clearTimeout(popupTimer)
21});
22  
23});
24  
25
26
27
28// //navbar expanded class toggle
29// $('.navbar-toggler').click(function () {
30//     $('#home-navbar').toggleClass('nav-expanded');
31//     $('#home-navbar').hasClass('nav-expanded') ? $('#brand-image').attr('src', 'assets/img/logo/RW-Logo-mobile.svg') : $('#brand-image').attr('src', 'assets/img/logo/RW Logo.svg');
32
33// })
34
35// //simulate nav button click on screen expand
36// $(window).resize(function () {
37//     if (($(window).width() > 767) &&  ($('#home-navbar').hasClass('nav-expanded'))) {
38//         $('#brand-image').attr('src', 'assets/img/logo/RW Logo.svg');
39//         $('.navbar-toggler').click();
40//     }
41//        }
42// )
43
44(function() {
45  'use strict';
46  window.addEventListener('load', function() {
47  // Fetch all the forms we want to apply custom Bootstrap validation styles to
48  var form = document.getElementById('subscribeForm');
49  // prevent submission
50    form.addEventListener('submit', function (event) {
51
52      const email = $('#email').val();
53
54    console.log('submit')
55  if (form.checkValidity() === false) {
56  event.preventDefault();
57    event.stopPropagation();
58
59    // console.log('validated')    
60  } 
61  form.classList.add('was-validated');
62      // console.log('dated')
63      if (form.checkValidity() === true) { 
64        event.preventDefault();
65          event.stopPropagation();
66      
67          $('.submit-btn').html('<span class="spinner-grow mr-4" role="status" aria-hidden="true"></span>Submitting...').prop('disabled', true);
68        $.post("https://api.convertkit.com/v3/forms/2205007/subscribe",
69            {
70                   email : email,
71                  api_key: "MoBqt0P8wQEXsNA3bVglcQ"
72      },
73          function (data, status) {
74
75            console.log(status)
76            
77              
78            console.log(data)
79            
80                //var modal = document.getElementById('successModal')
81                // var myModal = new bootstrap.Modal(document.getElementById('successModal'))
82            if (status==="success") {
83 
84                // myModal.show();
85                $("#subscribeForm").toggleClass('was-validated');
86              $("#subscribeForm")[0].reset();
87              $('.error-msg').html('');
88              $("#subscribeForm").fadeToggle(150);
89              $('#subscribeForm').html('<h4 class="success-msg font-weight-medium">Congrats! We\'ll be in touch.</h4>').prop('disabled', false); 
90              $("#subscribeForm").fadeToggle(300);
91              // $('.form-content').fadeOut(300);
92              // $(".hero-title h2").html("We would be in touch with you very soon");
93              // $(".hero-title").removeClass('col-xl-7').addClass('mx-auto');
94              // $(".hero-title h2").fadeToggle(300);
95           
96          }
97            else {$('.submit-btn').prop('disabled', false);
98            $('.submit-btn').html('Join our newsletter').prop('disabled', false);                
99                $('.error-msg').html('Oops!...Something went wrong! Refresh the page and try again');
100              
101          }
102          
103        });
104      }
105
106  }, false);
107
108  }, false);
109  })();
110
111
112
113  $("#modalSubscriptionForm").on('shown.bs.modal', function(){
114    var form = document.getElementById('modalSubscribeForm');
115    // prevent submission
116      form.addEventListener('submit', function (event) {
117  
118        const email = $('#modalEmail').val();
119  
120      console.log('submit')
121    if (form.checkValidity() === false) {
122    event.preventDefault();
123      event.stopPropagation();
124  
125      // console.log('validated')    
126    } 
127    form.classList.add('was-validated');
128        // console.log('dated')
129        if (form.checkValidity() === true) { 
130          event.preventDefault();
131            event.stopPropagation();
132        
133            $('#modalSubscribeForm .submit-btn').html('<span class="spinner-grow mr-4" role="status" aria-hidden="true"></span>Submitting...').prop('disabled', true);
134          $.post("https://api.convertkit.com/v3/forms/2205007/sub
134scribe",
135              {
136                     email : email,
137                    api_key: "MoBqt0P8wQEXsNA3bVglcQ"
138        },
139            function (data, status) {
140  
141              // console.log(status)
142              
143                
144              // console.log(data)
145              
146                  //var modal = document.getElementById('successModal')
147                  // var myModal = new bootstrap.Modal(document.getElementById('successModal'))
148              if (status==="success") {
149   
150                  // myModal.show();
151                  $("#modalSubscribeForm").toggleClass('was-validated');
152                $("#modalSubscribeForm")[0].reset();
153                $('#modalSubscriptionForm .error-msg').html('');
154                $("#modalSubscribeForm").fadeToggle(150);
155                $('#modalSubscribeForm').html('<h4 class="success-msg font-weight-medium text-center">Congrats! We\'ll be in touch.</h4>').prop('disabled', false); 
156                $("#modalSubscribeForm").fadeToggle(300);
157                // $('.form-content').fadeOut(300);
158                // $(".hero-title h2").html("We would be in touch with you very soon");
159                // $(".hero-title").removeClass('col-xl-7').addClass('mx-auto');
160                // $(".hero-title h2").fadeToggle(300);
161             
162            }
163              else {$('#modalSubscribeForm .submit-btn').prop('disabled', false);
164              $('#modalSubscribeForm .submit-btn').html('Join our newsletter').prop('disabled', false);                
165                  $('#modalSubscriptionForm .error-msg').html('Oops!...Something went wrong! Refresh the page and try again');
166                
167            }
168            
169          });
170        }
171  
172    }, false);
173 });
174
175

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.