2011-09-09 05:26:48 +02:00
|
|
|
<style>
|
|
|
|
.ui-autocomplete-loading { background: white url('images/ui-anim_basic_16x16.gif') right center no-repeat; }
|
|
|
|
</style>
|
2011-08-20 05:02:47 +02:00
|
|
|
<script>
|
2011-09-09 05:26:48 +02:00
|
|
|
$(function () {
|
|
|
|
$("#birds").autocomplete({
|
|
|
|
source: "/Settings/TestResults",
|
|
|
|
minLength: 3,
|
|
|
|
delay: 500,
|
|
|
|
select: function (event, ui) {
|
|
|
|
$(this).val(ui.item.Title);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
.data("autocomplete")._renderItem = function (ul, item) {
|
|
|
|
return $("<li></li>")
|
|
|
|
.data("item.autocomplete", item)
|
|
|
|
.append("<a><strong>" + item.Title + "</strong><br>" + item.FirstAired + "</a>")
|
|
|
|
.appendTo(ul);
|
|
|
|
};
|
|
|
|
});
|
|
|
|
</script>
|
2011-08-26 19:45:59 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-09 05:26:48 +02:00
|
|
|
<div class="demo">
|
2011-08-26 19:45:59 +02:00
|
|
|
|
2011-09-09 05:26:48 +02:00
|
|
|
<div class="ui-widget">
|
|
|
|
<label for="birds">Birds: </label>
|
|
|
|
<input id="birds" />
|
|
|
|
</div>
|
2011-08-26 19:45:59 +02:00
|
|
|
|
2011-09-09 05:26:48 +02:00
|
|
|
</div><!-- End demo -->
|