jQuery Mobile Not firing pageinit

davemaster

New Member
Now, my question is 'simple' (the question is, the solution maybe not). I have a function that retrieves data using $.json(). The data has to be loaded into a \[code\]<ul>\[/code\] using a function which is called from the 'pageinit'/'pageshow'.Though it does not load anything at all. BUT! When I refresh the page, it loads the pageinit completely without problems.This is my jQuery;\[code\]$('#showsPage').bind('pageshow', function(event) { getShows();});/******* FUNCTIONS *********/function getShows(){ // Loading. $.mobile.loading('show'); // Load the data. $.getJSON("some url", function(json) { $("#listShows li").remove(); $.each(json.data, function(index, show) { $("#listShows").append("<li><a href='http://stackoverflow.com/questions/12748606/#'>Stuff</a></li>"); $("#listShows").listview('refresh'); // Hide the loading. $.mobile.loading('hide'); }); });}\[/code\]Am I doing something drastically wrong? I have a pageinit running on a different page without problems.
 
Back
Top