JQuery Mobile. I have been using $(document).ready(function(){ for a while and I just realized that I shouldn't have been.
So I have been making this app for a while and have been putting all my code in the .ready event but now I realize that I should have been using $(document).bind("pageinit", function(){ because I now cannot call the refresh methods for anything on dynamically created content. (they just return this error in the console:
Uncaught TypeError: Object [object Object] has no method 'listview') So when I change the .ready event to the 'pageinit' event the refresh methods no longer return an error. But now my ajax calls will not work, they are being skipped entirely not even coming up with an error. What is going on and how do I fix this so I can use 'pageinit' and get my ajax calls to work?