Skip to content

Google Suggest for jQuery is an abstraction of jQueryUI's autocomplete widget that interacts with the unofficial/undocumented Google Suggest API.

Notifications You must be signed in to change notification settings

rafasashi/jquery.googleSuggest

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Since this plugin builds on top of jQueryUI's autocomplete widget, pretty much all of autocomplete's options/events are applies to it as well, with the exception of source.

Google Suggest for jQuery itself has 2 options: service and secure.

Options:

option type default note
service string "" It's used to specify what Google service to query against. It can be web, youtube, products, books, news, images, recipes, or "" (empty string). By default it queries Google's web auto suggestions (the web option).
secure boolean false It's used to specify whether to use HTTPS or not. By default it doesn't use secure connection.

Example:

//uses default settings
$("#selector").googleSuggest(); 

//uses HTTPS
$("#selector").googleSuggest({secure: true});

//queries Google Products
$("#selector").googleSuggest({service: "products"});

//alerts the selected value
$("#selector").googleSuggestion({select: function(event, ui){ alert(ui.item.value); }});

You can access the autocomplete settings directly.

$("selector").autocomplete("option", "disable");

About

Google Suggest for jQuery is an abstraction of jQueryUI's autocomplete widget that interacts with the unofficial/undocumented Google Suggest API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 54.6%
  • HTML 45.4%