Changeset 4213
- Timestamp:
- 12/17/07 21:02:16 (1 year ago)
- Location:
- trunk/plugins/autocomplete
- Files:
-
- 2 modified
-
jquery.autocomplete.css (modified) (1 diff)
-
jquery.autocomplete.js (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/autocomplete/jquery.autocomplete.css
r3907 r4213 39 39 } 40 40 41 .ac_odd { 42 background-color: #eee; 43 } 44 41 45 .ac_over { 42 46 background-color: #0A246A; -
trunk/plugins/autocomplete/jquery.autocomplete.js
r4185 r4213 671 671 list = $("<ul>").appendTo(element).mouseover( function(event) { 672 672 if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') { 673 active = $("li", list).removeClass( ).index(target(event));673 active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event)); 674 674 $(target(event)).addClass(CLASSES.ACTIVE); 675 675 } … … 742 742 if ( formatted === false ) 743 743 continue; 744 var li = $("<li>").html( options.highlight(formatted, term) ).a ppendTo(list)[0];744 var li = $("<li>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_event" : "ac_odd").appendTo(list)[0]; 745 745 $.data(li, "ac_data", data[i]); 746 746 } … … 820 820 }, 821 821 selected: function() { 822 var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass( );822 var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE); 823 823 return selected && selected.length && $.data(selected[0], "ac_data"); 824 824 },
