jQTouch-Calendar
jQTouch-Calendar copied to clipboard
scrolling AJAX calendar with tabbar
Hi,
I cannot for my life create a calendar that is loaded via AJAX (i.e. the whole div, containing toolber, etc. and time entries) so that it does scrolling properly. (I.e. whatever I do it scrolls the tabbar as well.) If it is hard-coded into the page's HTML all is fine.
So far I've found that the .s-scrollpane div has a height of 0 for some odd reason (while the calendar inside has some sensible height).
Here is my play project: http://pastie.org/1628780 ; calendar-content.html is here: http://pastie.org/1628786 (basically the same as in the hardcoded one). Could you, please, take a look at what I'm doing wrong? Or if you happen to have a shareable working example, could you, please, share it with me?
Thanks.
Hmmm... I've had a play around and nothing obvious is jumping out at me. I'll keep investigating and see what I find. I've been using it with static HTML so hadn't noticed the problem.
3 months issue, I know. Missing a semi-colon at line 95. It's better to put the getCalendar code within the AJAX-fetched page so it fires off when the page is done loading. Or you can do it like this: http://pastie.org/2133597 Basically, instead of letting jQTouch handle the ajax fetch, I do it myself and fire a function that would then call .getFunction on the dynamically loaded space AFTER the ajax call finishes. I've found that a lot of bugs with ajax happens because of async events.
I haven't tested the above code (I'm in a fix myself) but I think it should work.
Thanks and I'll check your suggestions but it'll take some time because I'm busy with other stuff now.