jQuery Mobile + FullCalendar - need to refresh page to see it with multiple page divs -
please see jsbin test page illustrates issue
i have simple jqm page 2 page divs. initialization being done inside $(document).on('pageshow', function(){}); block. inside block, initialize fullcalendar.js calendar.
if load page external page (the first link in menu) loads without hitch (but it's not using ajax, page flickers , there's no transition).
if load page using jqm convention of linking id of second page div anchor tag, loads calendar div page no data.
if refresh page, data displayed. subsequent use of menu displays both page divs pages without issue.
i've seen lot of discussion event of pagecontainer widget use, , i'm aware document.ready() not way go. i've tried possibilities, think (pagebeforeshow, pageshow, pageinit, etc.) there's more detail in demo, can see code. if need post here, too, can that, it's easier see issue if load test @ jsbin. suggest running in separate window, can refresh page.
if else has solved or has idea i'm doing wrong, i'd appreciate , / or suggestions.
i put of pagecontainer events test jsbin code , stepped through them. (thanks gajotres providing useful documentation on various pagecontainer hooks). turns out 1 needed 'pagecontainerhide' instead of pageshow, pageinit, or of others. once modified code use event, calendar displayed on page div, transition, , no longer had click on refresh see load "page".
since have events there, perhaps others page change issues can benefit test page....
Comments
Post a Comment