PageSourceSearch

https://vervemail.com/wp-content/themes/salient/nectar/assets/functions/ajax-search/wpss-search-suggest.js

js vervemail.com collected 2026-09-26 09:13:40 UTC 1,051 bytes, 44 lines download raw bytes

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

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.