I am creating an application using jQuery mobile and loading its menu and pages from wordpress throw jsonp. I loding his menu in the form of collapsibleset and listview, but I keep getting errors. when i try to update collapsibleset with this code
$(".childnev").html(list); $.mobile.loading( 'hide'); $('.popupmenu').slideToggle('slow'); $(".childnev").collapsibleset('refresh'); $(".childsublist").listview().listview('refresh');
It gives me this error
Error: cannot call methods on collapsibleset prior to initialization; attempted to call method 'refresh'
And when I try to update this code.
$(".childnev").html(list); $.mobile.loading( 'hide'); $('.popupmenu').slideToggle('slow'); $(".childnev").collapsibleset(); $(".childnev").collapsibleset('refresh'); $(".childsublist").listview().listview('refresh');
He gives me this error again
TypeError: o[0] is undefined
Am I missing something or did something wrong?
source share