0
I’m struggling to make this option work, I’d like when the user selects the city to list exactly how it’s done with the name and year, someone can help me?
var options = {
valueNames: [ 'name', 'born','city' ]
};
var userList = new List('users', options);
<script src="//cdnjs.cloudflare.com/ajax/libs/list.js/1.5.0/list.min.js"></script>
<div id="users">
<input class="search" placeholder="Search" />
<select >
<option> </option>
<option value="">Roma</option>
<option value="">London</option>
</select>
<ul class="list">
<li>
<h3 class="name">Jonny Stromberg</h3>
<p class="born">1986</p>
<p class="city">Roma</p>
</li>
<li>
<h3 class="name">Jonas Arnklint</h3>
<p class="born">1985</p>
<p class="city">Roma</p>
</li>
<li>
<h3 class="name">Martina Elm</h3>
<p class="born">1986</p>
<p class="city">London</p>
</li>
<li>
<h3 class="name">Gustaf Lindqvist</h3>
<p class="born">1983</p>
<p class="city">London</p>
</li>
</ul>
</div>
Library documentation used in the code: http://listjs.com/
– bfavaretto