Skip to content

Instantly share code, notes, and snippets.

@micmath
Created November 24, 2009 21:41
Show Gist options
  • Save micmath/242254 to your computer and use it in GitHub Desktop.
Save micmath/242254 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Example</title>
<script type="text/javascript" src="http://node1.bbcimg.co.uk/glow/gloader.0.1.2.js">
gloader.use("glow",
{map: "http://node1.bbcimg.co.uk/glow/glow/map.1.7.0.js"}
);
</script>
<style type="text/css" media="screen">
#header { background-color: #000; font: 16px Helvetica, Arial; color: #fff; padding: 8px; }
#main { background-color: #fff; font: 16px Helvetica, Arial; color: #000; padding: 8px; }
.autosuggest-light li { border: 2px solid pink; }
</style>
</head>
<body>
<div id="header">
<label>autosuggest one: <input type="text" id="my-input" /></label>
</div>
<div id="main">
<label>autosuggest two: <input type="text" id="my-otherinput" /></label>
</div>
<script type="text/javascript">
gloader.load(
["glow", "1.7.0", "glow.widgets.AutoSuggest"],
{
onload: function(glow) {
var myAutoSuggest = new glow.widgets.AutoSuggest("#my-input",
["Apple", "Banana", "Cucumber"],
{}
);
glow.dom.get(
myAutoSuggest.overlay.container.get(".autosuggest-light")[0]
).removeClass("autosuggest-light");
new glow.widgets.AutoSuggest("#my-otherinput",
["Xrayfish", "Yak", "Zebra"],
{}
);
}
}
);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment