Skip to content
Permalink
Browse files

Autocomplete demo: Added styling to the categories.

  • Loading branch information
scottgonzalez committed Feb 17, 2010
1 parent 5aaae1d commit d3141b84cb2cbfe6c01a3629623e5d4e6730e044
Showing with 5 additions and 2 deletions.
  1. +5 −2 demos/autocomplete/categories.html
@@ -10,7 +10,10 @@
<script type="text/javascript" src="../../ui/jquery.ui.autocomplete.js"></script>
<link type="text/css" href="../demos.css" rel="stylesheet" />
<style type="text/css">
.ui-autocomplete-category {
padding:.2em .4em;
line-height:1.5;
}
</style>
<script type="text/javascript">
$.each({
@@ -57,7 +60,7 @@
currentCategory = "";
$.each( items, function( index, item ) {
if ( item.category != currentCategory ) {
ul.append( "<li class='category'>" + item.category + "</li>" );
ul.append( "<li class='ui-widget-header ui-autocomplete-category'>" + item.category + "</li>" );
currentCategory = item.category;
}
self._renderItem( ul, item );

0 comments on commit d3141b8

Please sign in to comment.
You can’t perform that action at this time.