I'm using jQuery to create a listview and a filter. If the user clicks an item I want the filter to set the text to the item clicked and hide the list. But not permanently! The list needs to come back if the user changes the filter text.
Here is what I have:
$(document).ready(function () {
jQuery.support.cors = true;
$("#groupSelectList").listview({
filter: true,
filterPlaceholder: '',
icon: false
});
$('#groupSelectList').children('li').on('click', function () {
$('#groupName').val($(this).text());
$("input[data-type='search']").val($(this).text())
//$("#groupSelectList").listview("refresh");//this refresh doesn't appear to do anything.
$("#groupSelectList").listview().hide()//hide works, but the list won't come back if the user changes the input text.
});
});
...
The widget on this page is an example of the control I'm using: http://view.jquerymobile.com/master/demos/