1(function ($) { 2 "use strict"; 3 $(function () { 4 // re init layout after ajax request 5 $(document).on("sf:ajaxfinish", ".searchandfilter", function (e, data) { 6 if (window.elementorFrontend && window.elementorFrontend.elementsHandler && window.elementorFrontend.elementsHandler.runReadyTrigger) { 7 setTimeout(function () { 8 var runReadyTrigger = window.elementorFrontend.elementsHandler.runReadyTrigger; 9 runReadyTrigger($(data.targetSelector)); 10 var ajaxTarget = $(data.targetSelector); 11 if (ajaxTarget.length > 0) { 12 ajaxTarget.find('.elementor-widget').each(function () { 13 runReadyTrigger($(this)); 14 }); 15 } 16 }, 100); 17 } 18 }); 19 }); 20 21 // Detects the end of an ajax request being made. 22 var forms = []; 23 $(document).on("sf:ajaxfinish", ".searchandfilter", function (e, form) { 24 var $form = $('.searchandfilter[data-sf-form-id=' + form.sfid + ']') 25 forms[form.sfid] = $form[0].innerHTML; 26 }); 27 28 // load search forms in popups 29 $(window).on('elementor/frontend/init', function () { 30 // Search forms in popups reset to their page load state every time they are shown. 31 // So we need to keep track of the latest one, and reload it into the popup when it is shown. 32 if (window.elementorFrontend) { 33 window.elementorFrontend.elements.$window.on('elementor/popup/show', (e, id, document) => { 34 if ($().searchAndFilter) { 35 var $sliders = $('.elementor-popup-modal .searchandfilter .meta-slider'); 36 if ($sliders.length > 0) { 37 $sliders.empty(); 38 } 39 40 // Get the forms ID: 41 $('.elementor-popup-modal .searchandfilter').each(function () { 42 var $form = $(this); 43 $form.off(); 44 var formId = $form.data('sf-form-id'); 45 if (forms[formId]) { 46 // Replace the form with the latest version: 47 $form.html(forms[formId]) 48 } 49 $form.searchAndFilter(); 50 51 }); 52 } 53 }); 54 } 55 }); 56 57}(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.