I'm using jquery autocomplete to load the values in the textbox:
@Html.TextBox("Cities", "", new { @id="tags" })
<script type="text/javascript">
$(function () {
var availableTags = [
"New York",
"London",
"Moscow",
"Paris",
"Berlin",
"Madrid",
];
$( "#tags" ).autocomplete({
source: availableTags
});
});
Actually, I have more than 1000 cities and I'm going to store them in the database and send to the view through the model. Also, for more enjoyable appearance I want to add country flag to the drop-down list of my textbox like:
How can I do it? How to add image to the autocomlete source?