mirror of
https://github.com/jquery/jquery-ui.git
synced 2026-04-20 03:02:41 -04:00
Autocomplete demo: Added styling to the categories.
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user