1jQuery(document).ready(function ($){ 2 3 if($('#search-outer.nectar').length > 0){ 4 5 var acs_action = 'myprefix_autocompletesearch'; 6 $("body").on('focus','#s',function(){ 7 8 if(!$(this).hasClass('ui-autocomplete-input')) { 9 $(this).autocomplete({ 10 delay: 50, 11 position: {of: "#search-outer #search .container" }, 12 appendTo: $("#search-box"), 13 source: function(req, response){ 14 $.getJSON(MyAcSearch.url+'?callback=?&action='+acs_action, req, response); 15 }, 16 select: function(event, ui) { 17 window.location.href=ui.item.link; 18 }, 19 minLength: 2, 20 }).data( "ui-autocomplete" )._renderItem = function( ul, item ) { 21 return $( "<li>" ) 22 .append( "<a>" + item.image + "<span class='title'>" + item.label + "</span><br/><span class='desc'>" + item.post_type + "</span> </a>" ) 23 .appendTo( ul ); 24 }; 25 } 26 27 }); 28 29 } 30 31});
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.