1(function ($) { 2 const ProjectsFilters = { 3 init: function () { 4 this.events() 5 }, 6 events: function () { 7 const self = this 8 $('body').on('change', '.project-filter-select', function (e) { 9 self.processFilter(); 10 }); 11 $('body').on('click', '.form-button.reset-form', function (e) { 12 e.preventDefault(); 13 location.reload(); 14 }); 15 $('body').on('submit', '#projects-fliters-form', function (e) { 16 e.preventDefault(); 17 self.processFilter(); 18 }); 19 $('body').on('click', '.filter-casetype', function (e) { 20 e.preventDefault(); 21 var casetype = $(this).data('cid'); 22 if ($(this).hasClass('active-casetype')) { 23 $('#casetypefilter').val(''); 24 25 } else { 26 $('.filter-casetype').removeClass('active-casetype'); 27 $('#casetypefilter').val(casetype); 28 29 } 30 $(this).toggleClass('active-casetype') 31 self.processFilter(); 32 }); 33 34 }, 35 processFilter: function () { 36 37 var formdata = $('#projects-fliters-form').serialize(); 38 $('.category-list').replaceWith('<div class="category-list"><div class="loading-projects ">Loading...</div></div>'); 39 $.ajax({ 40 url: '/wp-admin/admin-ajax.php', 41 method: 'POST', 42 data: formdata, 43 success: function (res) { 44 $('.category-list').replaceWith(res); 45 } 46 }) 47 }, 48 49 } 50 $(document).ready(function () { 51 ProjectsFilters.init(); 52 if ($('.project-about').length == 0 && $('.project-about-info .elementor-widget-container p').length == 0) { 53 $('.project-about-section').hide(); 54 } 55 if ($('.project-breadcrumb').length > 0) { 56 var bhtml = $('#breadcrumbs').html(); 57 $('#breadcrumbs').html('<span><a href="/projects/">Project</a></span> > ' + bhtml); 58 59 } 60 }) 61})(jQuery)
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.