1function initCustomForms() { 2 jcf.setOptions("Select", { 3 wrapNative: false, 4 maxVisibleItems: 8, 5 }); 6 jcf.replaceAll(); 7} 8 9jQuery(document).on( 10 "gform_post_render", 11 function (event, form_id, current_page) { 12 initCustomForms(); 13 14 if(!$(".contact-form #field_6_20").first().parents().hasClass("row")) { 15 $(".contact-form #field_6_20, .contact-form #field_6_16, .contact-form #field_6_17, .contact-form #field_6_18").wrapAll("<div class='row'></div>"); 16 } 17 18 if(!$(".contact-form #field_6_12").first().parents().hasClass("row")) { 19 $(".contact-form #field_6_12, .contact-form #field_6_13").wrapAll("<div class='row'></div>"); 20 } 21 22 23 // if (!$(".contact-form .wrap_inner").first().parents().hasClass("row")) { 24 // $(".contact-form .wrap_inner").wrapAll( 25 // "<div class='row' style='position: relative'></div>" 26 // ); 27 // } 28 29 if ( 30 !$(".contact-form .foot_item") 31 .first() 32 .parents() 33 .hasClass("contact-form-footer") 34 ) { 35 $(".contact-form .foot_item").next().css("flex", "0 0 180px"); 36 $(".contact-form .foot_item") 37 .next() 38 .andSelf() 39 .wrapAll( 40 "<div class='contact-form-footer' style='position: relative;'></div>" 41 ); 42 } 43 } 44); 45 46$("#search_form select").change(function () { 47 $('[name="page"]').val(1); 48 $("#search_form").submit(); 49}); 50 51$("#search_form").on("submit", function (e) { 52 e.preventDefault(); 53 $.ajax({ 54 type: "POST", 55 url: "/wp-admin/admin-ajax.php", 56 data: $("#search_form").serialize(), 57 success: function (res) { 58 $(".recepy").remove(); 59 $(".recipes-list").addClass("ajax-loaded"); 60 var data = JSON.parse(res); 61 var html = data.html; 62 var pagination = data.pagination; 63 $(".cards").html(html); 64 $('[name="max_num_pages"]').val(data.max_num_pages); 65 $('[name="page"]').val(data.paged); 66 if ($(".pages").length > 0) { 67 $(".pages").replaceWith(pagination); 68 } else { 69 $(".recipes-list").append(pagination); 70 } 71 }, 72 }); 73}); 74 75$(document).on("click", ".ajax-loaded .pages-list a", function (e) { 76 e.preventDefault(); 77 if ($(this).hasClass("current")) { 78 return; 79 } 80 var total_pages = parseInt($('[name="max_num_pages"]').val()); 81 var current_page = parseInt($('[name="page"]').val()); 82 var nextPage = -1; 83 if ($(this).hasClass("next")) { 84 if (total_pages > current_page) { 85 nextPage = current_page + 1; 86 } else { 87 nextPage = -1; 88 } 89 } 90 if ($(this).hasClass("prev")) { 91 if (current_page > 1) { 92 nextPage = current_page - 1; 93 } else { 94 nextPage = -1; 95 } 96 } 97 if (!$(this).hasClass("prev") && !$(this).hasClass("next")) { 98 nextPage = parseInt($(this).attr("value")); 99 if (nextPage < 0 || nextPage > total_pages) { 100 nextPage = -1; 101 } 102 } 103 if (nextPage > 0) { 104 $('[name="page"]').val(nextPage); 105 $("#search_form").submit(); 106 } 107}); 108 109$(document).ready(function () { 110 if (window.location.href.match(/(recipes)/) != null) { 111 var menu_hrefs = document.querySelectorAll("#menu-header-menu a"); 112 $('#menu-header-menu a[href="' + window.location.href + '"]') 113 .parent() 114 .addClass("current-menu-item current_page_item"); 115 } 116});
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.