How To
Quick Search Element Placement
1 min
sometimes you need to have more control over the exact placement of the results for quick search luckily there is a setting in the library that allows you to specify this using any element on the page // wait for the klevu library to be ready window klvready = window klvready || \[]; window klvready push(function(){ klevu({ search { // tell klevu to use this as the target to show quick search results searchboxtarget document queryselector("#mycustomtarget"), } });	 // if quick search has already been initialized, rebuild it to use the new settings if (klevu getobjectpath(klevu settings, 'flags bindlocalboxes build', false)) { klevu rebuild quick(); }	 }); the code above will wait for the klevu library to be loaded, then will specify the element to use for the searchboxtarget note the value you pass to searchboxtarget must be a reference to the element itself and not just a css selector sometimes the quick search has already loaded and initialized by the time you run this code, so the example above will also rebuild quick search to use the new setting if needed