1 2$(document).ready(function () { 3 $('.navbar-brand').click(function () { 4 window.location.href = "home"; 5 }); 6 onloadhowitwork(); 7 hamburgerMenu(); 8 Validation(); 9 faqmenuclick(); 10}); 11 12function onloadmenubor() { 13 var link = window.location.href; 14 var target = link.substring(link.indexOf("Inox7Star") + 10, link.length); 15 $('.dviderNAV').removeAttr('style'); 16 switch (target) { 17 case 'products': 18 $('.productspage').find('.dviderNAV').css('display', 'block'); 19 break; 20 case 'about-us': 21 $('.about-uspage').find('.dviderNAV').css('display', 'block'); 22 break; 23 case 'contact-us': 24 $('.contact-uspage').find('.dviderNAV').css('display', 'block'); 25 break; 26 case 'home#howitworks': 27 $('.howitworkspage').find('.dviderNAV').css('display', 'block'); 28 break; 29 } 30} 31 32function onloadhowitwork() { 33 var Widths = $(window).width(); 34 if (Widths >= 768) { 35 var link = window.location.href; 36 var target = link.substring(link.indexOf("#") + 1, link.length); 37 switch (target) { 38 case 'howitworks': 39 $('html, body').animate({ scrollTop: 1380 }, '300'); 40 break; 41 default: 42 // window.location.href = "loyalty#" + target + ""; 43 } 44 } 45} 46function hamburgerMenu() { 47 var Widths = $(window).width(); 48 if (Widths <= 767) { 49 $(".navbar-toggle, .navbar-right li").unbind().click(function (e) { 50 if ($('.navbar-collapse').css("right") == "-960px") { 51 $('.navbar-collapse').css("right", "0px"); 52 $('.bs-slider').css("z-index", "-1"); 53 $('body').css("overflow", "hidden"); 54 55 $('.overlay1').css("z-index", "99"); 56 $('.overlay1').css("display", "block"); 57 } 58 else { 59 $('.navbar-collapse').css("right", "-960px"); 60 $('body').css("overflow-y", "initial").css("overflow-x", "hidden"); 61 $('.bs-slider').css("z-index", "0"); 62 63 $(".navbar-toggle").show(); 64 } 65 }); 66 67 $(".collapse, .navBorder").unbind().click(function (e) { 68 $('.overlay1').css("display", "none"); 69 }); 70 } 71}; 72 73$(document).on('click', function (e) { 74 var Widths = $(window).width(); 75 if (Widths <= 767) { 76 if ($(e.target).closest('.navbar-toggle').length == 0) { 77 $('.navbar-collapse').css("right", "-960px"); 78 $('body').css("overflow", "initial").css("overflow-x", "hidden");; 79 $('.bs-slider').css("z-index", "0"); 80 $(".navbar-toggle").show(); 81 $('.overlay1').css("display", "none"); 82 } 83 } 84 if (e.target.parentElement == $('.share-arrow')[0]) { 85 if ($(".socialshare").hasClass("socshrblk")) { 86 $('.socialshare').removeClass('socshrblk'); 87 } 88 else { 89 $('.socialshare').addClass('socshrblk'); 90 } 91 } 92 else { 93 $('.socialshare').removeClass('socshrblk'); 94 } 95}); 96 97$('#txtContact').keyup(function (e) { 98 if (/\D/g.test(this.value)) { 99 // Filter non-digits from input value. 100 this.value = this.value.replace(/\D/g, ''); 101 } 102}); 103 104function IsEmail(email) { 105 var regex = /^([a-zA-Z0-9_\.\-\+])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/; 106 if (!regex.test(email)) { 107 return false; 108 } else { 109 return true; 110 } 111} 112 113function Validation() { 114 115 var count = 0; 116 117 $('.BtnStruc').click(function () { 118 if ($('#txtName').val() == '') { 119 $('.txtName').addClass('input--filled'); 120 $('[id$=error_Name]').css("display", "block"); 121 } else { 122 $('.txtName').removeClass('input--filled'); 123 $('[id$=error_Name]').removeAttr('style'); 124 } 125 126 if ($('#txtEmail').val() == '') { 127 $('.txtEmail').addClass('input--filled'); 128 $('[id$=error_Email]').css("display", "block"); 129 } else { 130 var isEamil = IsEmail($('#txtEmail').val()); 131 if (!isEamil) { 132 $('.txtEmail').addClass('input--filled'); 133 $('[id$=error_Email]').text('Please enter valid Email.'); 134 } else { 135 $('.txtEmail').removeClass('input--filled'); 136 $('[id$=error_Email]').removeAttr('style'); 137 } 138 // $('.txtEmail').removeClass('input--filled'); 139 } 140 141 if ($('#txtContact').val() == '') { 142 $('[id$=error_contactno]').css("display", "block"); 143 $('.txtContact').addClass('input--filled'); 144 } else { 145 $('.txtContact').removeClass('input--filled'); 146 $('[id$=error_contactno]').removeAttr('style'); 147 } 148 149 if ($('#txtMsg').val() == '') { 150 $('.txtMsg').addClass('input--filled'); 151 $('[id$=error_message]').css("display", "block"); 152 } else { 153 $('.txtMsg').removeClass('input--filled'); 154 $('[id$=error_message]').removeAttr('style'); 155 } 156 157 if ($('#txtName').val() != "" && $('#txtEmail').val() != "" && $('#txtContact').val() != "" && $('#txtMsg').val() != "") { 158 $('.loading').show(); 159 $.ajax({
160 type: 'POST', 161 url: 'Contactus.aspx/insertcontactdetails', 162 async: true, 163 dataType: 'json', 164 contentType: "application/json; charset=utf-8", 165 data: JSON.stringify({ "Name": $('#txtName').val(), "EmailID": $('#txtEmail').val(), "ContactNo": $('#txtContact').val(), "Message": $('#txtMsg').val() }), 166 success: function (data) { 167 if (data != null && data.d != "") { 168 $('.loading').hide(); 169 //var contentData = $.parseJSON(data.d); 170 if (data.d == "True") { 171 $('#txtName').val(''); 172 $('#txtEmail').val(''); 173 $('#txtContact').val(''); 174 $('#txtMsg').val(''); 175 $('#txtName').focus(); 176 swal('Thank you', 'We have received your message we will contact you as soon as possible!', 'success'); 177 } 178 else { 179 swal('Sorry', 'Oops! Error is occured please try again.', 'error'); 180 } 181 } 182 }, 183 error: function (err) { 184 $('.loading').hide(); 185 swal('Sorry', 'Oops! Error is occured please try again.', 'error'); 186 } 187 }); 188 189 } else { 190 $('.ErrorTextCss').css("display", "block"); 191 } 192 }); 193} 194 195// Function to reveal lightbox and adding YouTube autoplay 196function revealVideo(div, video_id, UrLId) { 197 // var video = document.getElementById(video_id).src; 198 var video = "https://www.youtube.com/embed/" + UrLId + "?autoplay=1&showinfo=0&rel=0"; 199 200 document.getElementById(video_id).src = video; // adding autoplay to the URL 201 document.getElementById(div).style.display = 'block'; 202 203} 204// Hiding the lightbox and removing YouTube autoplay 205function hideVideo(div, video_id) { 206 207 //var video = document.getElementById(video_id).src; 208 //var cleaned = video.replace('&autoplay=1', ''); // removing autoplay form url 209 document.getElementById(video_id).src = ""; 210 document.getElementById(div).style.display = 'none'; 211 212 // $('#Iframe1').contentWindow.postMessage('{"event":"command","func":"' + 'stopVideo' + '","args":""}', '*'); 213 214} 215 216function faqmenuclick() { 217 $('.faq-ulmenu li a').click(function () { 218 var id = $(this).attr('data-id'); 219 $('.faq-ulmenu li a').removeClass('faq-active'); 220 $(this).addClass('faq-active'); 221 $('.tab-pane').removeClass('in').removeClass('active'); 222 $('[id$=' + id + ']').addClass('in').addClass('active'); 223 $('.panel-heading').addClass('collapsed'); 224 $('.panel-heading').next().removeClass('in'); 225 }); 226 227 $('.panel-heading').click(function () { 228 var scrollHeight = $(document).scrollTop(); 229 230 setTimeout(function() { 231 $(window).scrollTop(scrollHeight ); 232 }, 5); 233 $('.panel-heading').addClass('collapsed'); 234 $(this).removeClass('collapsed'); 235 $('.panel-heading').next().removeClass('in'); 236 $(this).next().addClass('in'); 237 }); 238}
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.