I\'m building a mobile web app with jQuery Mobile and I have a problem. I am using jQuery to parse an XML file and create list items. It builds the list, then apppends that
My solution was to use no parameters in the listview method as in
my playlist
Back
end then..
$('#playlist').bind('pageshow', function () {
doOnCallBack = function(){
$('#playlist').find('[data-role="listview"]').listview();
}
ajaxGet('${genSecureLink(action:'updatePlaylistTemplate',controller:'ajaxActionsPd',absolute:'true')}',$('#playlist').find('[data-role="content"]'),doOnCallBack);
});
here is my function ajaxGet:
function ajaxGet(url,target,doOnCallBack){
$.ajax({
url: url,
error:function(x,e){handleAjaxError(x,e);},
beforeSend:function(){$.mobile.showPageLoadingMsg();},
complete:function(){$.mobile.hidePageLoadingMsg();doOnCallBack();},
success:function(data, textStatus, jqXHR){target.html(data);}
});
}