Free Code > Glossy Scripts > Glossy Search
Glossy Search is a JavaScript+CSS solution for creating an auto- How to usePlace the JavaScript and CSS code somewhere on your site, and then reference them in the header of your documents as follows:
<link rel="stylesheet" type="text/css" href="glossysearch.css" />
<script type="text/javascript" src="glossysearch.js"></script> In your own site navigation JavaScript file (which you should reference after the Glossy code in the header of your documents), you can populate your search index with keyword terms and their corresponding links as follows:
glossySearch.addTerm( "JavaScript Menus", "/glossymenus" );
glossySearch.addTerm( "JavaScript Search", "/glossysearch" ); glossySearch.addTerm( "JavaScript Slides", "/glossyslides" ); glossySearch.addTerm( "JavaScript Tabs", "/glossytabs" ); In your site pages, place the search rendering code wherever you want the search box to appear: <script type="text/javascript">
glossySearch.printSearchBox(); </script> Customizing the searchYou can redefine any/all styles as defined in the CSS file (it is recommended that you override them with your own stylesheets rather than alter the default styles in the source). You can also assign your own values to several JavaScript variables:
If you find this code useful, please consider making a donation.
Copyright © Globalisk. All rights reserved. |
|
||||||||||||||||||||||||||||||||||||||||||