For anyone used to using SharePoint 2010 and SharePoint 2013 search centers they are familiar with the issue of losing users losing the “This Site” scope on subsequent searches in the search center. The post below demonstrates how to use jQuery to preserve the “This Site” context.
Take care to reference a CDN version of jQuery or download a copy to your site assets.
<div class=”ms-rteFontSize-2″ id=”ulink” style=”margin: 10px”><a href=”/”>Searching all sites</a></div>
Ulysses Ludwig is a SharePoint architect with over 16 years in the IT and computer industry. Ulysses' primary focus is SharePoint but he dabbles in the latest web technologies and likes to develop software in his spare time.