27 lines
888 B
HTML
27 lines
888 B
HTML
{% load static %}
|
|
<ul class="list-group">
|
|
{% for topten in topten_list %}
|
|
<li class="list-group-item">
|
|
<a href="#" class="autocomplete-panel-item" data-name="{{ topten.name }}" style="color: #16a085">
|
|
{{ topten.name }}- (<span id="lat">{{ topten.province }}</span>,<span
|
|
id="lon">{{ topten.cities }}</span>,<span id="lon">{{ topten.district }}</span>)
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<script>
|
|
$(function () {
|
|
console.log("2222222222222222")
|
|
$('.autocomplete-panel-item').click(function (e) {
|
|
e.preventDefault();
|
|
var name = $(this).data('name');
|
|
console.log(name+"11111111111111111111111111111111")
|
|
$('.main-search input').val(name)
|
|
$('.filter-panel').hide();
|
|
$('.list-group').hide();
|
|
|
|
})
|
|
})
|
|
|
|
</script>
|