Stumble across some JQuery examples on Digg while having my breakfast. Hhaa.. Enjoy~
1. JGlide Menu

HOorrray! This is my first blog since the day i know how to write! Haha. Hmm.. For those who actually bother to read my post, pardon me for all all my wonderful grammars mistake and spelling errors. =D
Anyway, I would like to share with you, this cool piece of technology from our dear friend Mr Google! It’s call “The Google AJAX Search“. It’s a Javascript library that allows you to embed this search engine into your web pages and also other web applications. Neat right!? =D
A simple example of how to implement it. Of course you’ll need to register for the google API key first. =D
Includes these files at your header.
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0&key=<?=GOOGLE_API_KEY?>" type="text/javascript"></script>
<link href="http://www.google.com/uds/css/gsearch.css" rel="stylesheet" type="text/css"/>
Remember to replace the “<?GOOGLE_API_KEY?> to your registered key
Next put these codes in :
function LoadNewsBar(keyword)
{
// create a search control
var searchControl = new google.search.SearchControl();
// Set the Search Control to get the most number of results
searchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
// Create 2 searchers and add them to the control
searchControl.addSearcher(new google.search.WebSearch());
// Set the options to draw the control in tabbed mode
var drawOptions = new google.search.DrawOptions();
drawOptions.setDrawMode(google.search.SearchControl.DRAW_MODE_TABBED);
// Draw the control onto the page
searchControl.draw(document.getElementById("newsBar"), drawOptions);
// Search!
searchControl.execute(keyword);
}
The “keyword” variable used inside the code is the word that you’re going to search for. So to get it up working fast, you might want to hardcode to some keywords in mind?
Example :
var keyword = 'google';
Congrats! You’ve successfully implement Google Ajax Search into your web. For more details on the API, click HERE. You may want to check out their cool ‘playground’ and toy around their API.
For a working demo click HERE.