I’m unable to refresh lists in jQueryMobile.
$('ul').listview('refresh');
The code above generates the following error:
uncaught exception: cannot call methods on listview prior to initialization; attempted to call method ‘refresh’
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Make sure that you’re not calling
refresh();until the DOM is loaded$(document).ready()ensures this. Lists are not initialized until the DOM has finished loading and so you’d be calling refresh on something that is not initialized explaining your error.