A jQueryplugin
that sets a div or span to show a Google Search Bookbar.
The current version is 2.0.0 and is available
under the MIT licence.
For more detail see the documentation reference page.
Or see a minimal page that you could
use as a basis for your own investigations.
The
Google Search Bookbar functionality can easily be added to a division.
It displays a set of books links based on provided search terms.
The default search term is 'jquery'.
Google places some restrictions on your use of this service, including
obtaining a key
specific to a target URL providing the service, making the Web site
freely accessible, and showing included Google branding.
See the link above for more details.
You can also remove the GSBookbar widget if it is no longer required.
You can set the bookbar up to cycle automatically through a set of search terms,
with control over the interval between cycles and the order.
Just pass an array of search terms when attaching the bookbar.
Cycling:
$('#cycleBookbar').gsbookbar(
{search: ['jquery', 'australia', 'cats', 'dance']});
var times = [$.gsbookbar.cycleVShort, $.gsbookbar.cycleShort,
$.gsbookbar.cycleMedium, $.gsbookbar.cycleLong];
var modes = [$.gsbookbar.cycleRandom, $.gsbookbar.cycleLinear];
$('#cycleTime,#cycleMode').change(function() {
$('#cycleBookbar').gsbookbar('option',
{cycleTime: times[$('#cycleTime').val()],
cycleMode: modes[$('#cycleMode').val()]});
});
Custom Search
You can provide preset links or free text entry to generate
new book searches by using the 'search' command.
This tab highlights examples of this plugin in use "in the wild".
None as yet.
To add another example, please contact me (wood.keith{at}optusnet.com.au)
and provide the plugin name, the URL of your site, its title,
and a short description of its purpose and where/how the plugin is used.
Quick Reference
A full list of all possible settings is shown below. Note that not all would apply in all cases.
For more detail see the documentation reference page.
$(selector).gsbookbar({
horizontal: true, // True for horizontal display, false for vertical
thumbnailSize: this.thumbnailsMedium, // The size of the book thumbnails
search: 'jquery', // Single or list of search terms
manyResults: false, // True for many results, false for only a few
cycleTime: this.cycleMedium, // Time between cycles of the search terms
cycleMode: this.cycleRandom // Mode of cycling through the search terms
});
$.gsbookbar.setDefaults(settings) // Change settings for all instances
$(selector).gsbookbar('option', settings) // Change the instance settings
$(selector).gsbookbar('option', name, value) // Change an instance setting
$(selector).gsbookbar('option', name) // Retrieve an instance setting
$(selector).gsbookbar('search', terms) // Perform a search
$(selector).gsbookbar('destroy') // Remove the GSBookbar functionality
Usage
Include the jQuery library in the head section of your page.