30 lines
691 B
Plaintext
30 lines
691 B
Plaintext
<div class="row center-align">
|
|
<h2>Koju nekretninu tražite?</h2>
|
|
</div>
|
|
|
|
<form method="POST" id="form-vrsta">
|
|
<div class="row center-align">
|
|
<ul class="collection with-header">
|
|
<% for(let vrsta of vrste) { %>
|
|
<li class="collection-item" > <div id="<%= vrsta.id %>" ><%= vrsta.ime %><a href="#!" class="secondary-content"><i class="material-icons">send</i></a></div></li>
|
|
<% } %>
|
|
</ul>
|
|
<input type="hidden" name="vrsta" id="vrsta" />
|
|
</div>
|
|
</form>
|
|
|
|
<script>
|
|
$(document).ready( () => {
|
|
$(".collection-item").click( (e) => {
|
|
const clickedId = $(e.target).attr("id");
|
|
$("#vrsta").val(clickedId);
|
|
$("#form-vrsta").submit();
|
|
});
|
|
});
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|