1/* Javascript */ 2jQuery(document).ready(function () { 3 //reset Button 4 var search_value = jQuery('#search-post'); 5 if (search_value.val() != null && search_value.val() != '') { 6 jQuery("#resetfilter").css({ 7 color: "#3099bf" 8 }); 9 jQuery("#resetfilter_m").css({ 10 color: "#3099bf" 11 }); 12 13 } 14 //eof reset button 15 //enter key form submission 16 jQuery('#search-post').keypress(function(event) { 17 if (event.keyCode === 13) { // 13 is the keyCode for Enter key 18 event.preventDefault(); // Prevent default form submission 19 this.form.submit(); // Submit the form 20 } 21 }); 22/* eof enter key form submission */ 23 24/*focus for video skippig iframe*/ 25jQuery(".elementor-video-iframe").attr("tabindex","-1"); 26/* eof focus for video skippig iframe */ 27 const queryString = window.location.search; 28const urlParams = new URLSearchParams(queryString); 29const searchterm = urlParams.get('search'); 30if(searchterm){var obj = document.querySelector('.custom-search-box'); 31 jQuery(".custom-search-box").show(); 32}else{ 33 jQuery(".custom-search-box").hide(); 34} 35 36 jQuery(".blog-item-grp").removeClass("site-main"); 37 38 // jQuery('input[type="checkbox"]').change(function () { 39 // show(); 40 // if (jQuery(this).is(":checked")) jQuery(this).parent().addClass("selected"); 41 // else jQuery(this).parent().removeClass("selected"); 42 // jQuery("#blog-filter").submit(); 43 // }); 44 45 // jQuery("#search-post").change(function () { 46 // show(); 47 // jQuery("#blog-filter").submit(); 48 // }); 49 50 // jQuery("#search-post").change(function () { 51 // show(); 52 // jQuery("#blog-filter").submit(); 53 // }); 54 55 // jQuery("#media").change(function () { 56 // show(); 57 // jQuery("#blog-filter").submit(); 58 // }); 59 // jQuery(".submit-btn").on("submit", function () { 60 // jQuery("#blog-filter").submit(); 61 // }); 62 63 // show(); 64 // jQuery("#blog-filter").on("submit", function (e) { 65 // e.preventDefault(); 66 // var contactFormData = jQuery("#blog-filter").serialize(); 67 // jQuery.ajax({ 68 // type: "POST", 69 // url: script_jsajax.ajaxurl, 70 // data: { 71 // action: "filter_form_data", 72 // formdata: contactFormData, 73 // }, 74 // success: function (response) { 75 // console.log(response); 76 // hide(); 77 // if (response.code == 200) { 78 // jQuery("#custom-blog-post").removeClass("not-found"); 79 // jQuery("#custom-blog-post").html(response.message); 80 // } else { 81 // jQuery("#custom-blog-post").addClass("not-found"); 82 // jQuery("#custom-blog-post").html(response.message); 83 // } 84 // }, 85 // error: function (jqXHR, exception) { 86 // var msg = ""; 87 // if (jqXHR.status === 0) { 88 // msg = "Not connect.\n Verify Network."; 89 // } else if (jqXHR.status == 404) { 90 // msg = "Requested page not found. [404]"; 91 // } else if (jqXHR.status == 500) { 92 // msg = "Internal Server Error [500]."; 93 // } else if (exception === "parsererror") { 94 // msg = "Requested JSON parse failed."; 95 // } else if (exception === "timeout") { 96 // msg = "Time out error."; 97 // } else if (exception === "abort") { 98 // msg = "Ajax request aborted."; 99 // } else { 100 // msg = "Uncaught Error.\n" + jqXHR.responseText; 101 // } 102 // console.log(msg); 103 // }, 104 // }); 105 // }); 106 107 function show() { 108 document.getElementById("spinner").classList.add("show"); 109 } 110 function hide() { 111 document.getElementById("spinner").classList.remove("show"); 112 } 113 114 // jQuery(window).scroll(function () { 115 // var sticky = jQuery(".blog-filter-grp"), 116 // scroll = jQuery(window).scrollTop(); 117 118 // if (scroll >= 100) sticky.addClass("fixed"); 119 // else sticky.removeClass("fixed"); 120 // }); 121 122 123 jQuery(".search-image").on("click", function (e) { 124 e.preventDefault(); 125 jQuery(".custom-search-box").toggle(); 126 }); 127}); 128 129// function myFunction() { 130// this.form.submit(); 131// } 132jQuery('input[type="radio"]').on("change", function (e) { 133 e.preventDefault(); 134 jQuery('input[name="radio"]:checked').val(); 135 this.form.submit(); 136}); 137jQuery('#category').on("change", function (e) { 138 e.preventDefault(); 139 //alert(); 140 //jQuery('input[name="select"]:selected').val(); 141 this.form.submit(); 142}); 143/*jQuery("#search-post").on("change", function (e) { 144 e.preventDefault(); 145 // jQuery('input[name="radio"]:checked').val(); 146 this.form.submit(); 147});*/ 148 149jQuery("#media").on("change", function (e) { 150 e.preventDefault(); 151 // jQuery('input[name="radio"]:checked').val(); 152 this.form.submit(); 153}); 154jQuery("#resetfilter").on("click", function (e) { 155 // e.preventDefault(); 156 // jQuery('input[name="radio"]:checked').val(); 157 jQuery(location).attr('href','/perspectives'); 158}); 159jQuery("#resetfilter_m").on("click", function (e) { 160 // e.preventDefault(); 161 // jQuery('input[name="radio"]:checked').val(); 162 jQuery(location).attr('href','/perspectives-mobile'); 163}); 164jQuery("#search-post").on("blur", function() 165{ 166 var search_value = jQuery('#search-post'); 167 if (search_value.val() != null && search_value.val() != '') { 168 jQuery("#resetfilter").css({ 169 color: "#3099bf" 170 }); 171 jQuery("#resetfilter_m").css({ 172 color: "#3099bf" 173 }); 174 } 175}); 176/*function clearsearchpost() { 177 document.getElementById('search-post').value = '' 178 179 }*/ 180jQuery('.submit-reset-btn').click(function() { 181 jQuery('#search-post').val(''); // Clear the value of the field 182 var currentUrl = window.location.href; 183 var urlParts = currentUrl.split('/'); // Split URL by "/" 184 var firstTwoParts = urlParts.slice(0, 4); 185 var redirectUrl = firstTwoParts.join('/'); // Join first two parts with "/" 186 window.location.href = redirectUrl; // Redirect to the new URL 187 });
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.