If you get the error here $('#ListSearch').listview("refresh"); //throwing error.
, then simply it's a case that either:
- The jQuery Mobile ListView plugin is not loaded.
- The jQuery Mobile ListView plugin is loaded, but is not working.
Check which script files are loaded in your web page (browser dev tools via the F12 key, etc) to see which scripts are loaded. Maybe that jQuery file is missing?
EDIT:
In your position I would try the following - start a new project and only include jQuery and jQuery Mobile script files. Then Take the code:
<script type="text/javascript">
$(function(){
$('#ListSearch').listview("refresh");
});
</script>
and see if the above fails. If it does, then 100% there is something wrong with the jQuery mobile script. Try getting that script file from somewhere else, like downloading it from the jQuery site and including it in your project.
Basically strip the code down to the minimal amount and see what works.