1jQuery(function($) { 2 3 $(".elementor-search-form__input").each(function() { 4 var ac = $(this); 5 var tipo=ac.parent().find("input[name='post_type']").val(); 6 if( typeof tipo === 'undefined' || tipo === null ) { 7 tipo="page"; 8 } 9 ac.autocomplete({ 10 delay: 300, 11 source: function (request, response) { 12 13 $.ajax({ 14 dataType: 'json', 15 url: AutocompleteSearch.ajax_url, 16 data: { 17 term: request.term, 18 action: 'autocompleteSearch', 19 security: AutocompleteSearch.ajax_nonce, 20 tipo: tipo, 21 }, 22 success: function (data) { 23 response(data); 24 } 25 }); 26 }, 27 select: function (event, ui) { 28 window.location.href = ui.item.link; 29 }, 30 31 minLength: 3, 32 }); 33 34 }); 35 36 37});
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.