$.UIScrollers no longer exists in chui.*.js
devgeeks opened this issue · comments
$.UIEnableScrolling used to check if a scroller was already on a scrollpanel and if so refresh it... otherwise it would create one.
Because of this, calling $.UIEnableScrolling() doesn't refresh the scroll after dynamically adding content... now it just adds moar scrollers :)
I am using https://github.com/rbiggs/chocolatechip-ui latest.
In the screenshot below you can see the second scrollbar on the demo that has had some content added then had $.UIEnableScrolling() run on it...
UIEnableScrolling is still there, but it gets executed automatically at page load. You do not need to call $.UIEnableScrolling() at all. However, if you've injected content into your layout, you will want to update that scroll panel. You can do that by getting the scroll panel and then executing the refresh method. The following example assumes the scrollpanel is in the main view:
$.main.find('scrollpanel').data('ui-scroller').refresh();
I'm thinking your might either have some malformed markup or some JavaScript error that's stopping iScroll from working properly.
From the link you have above I downloaded and tried out the examples, and iScroll is working in them properly.
Can you send me a zip? chocolatechipui@gmail.com
What are you testing on, by the way? I'm curious if the examples work for you, or not.
It's a PhoneGap app on the iOS Sim. However, just loading one of the examples into the iOS sim's browser, the $.main.find('scrollpanel').data('ui-scroller').refresh();
command works as expected.
I will have a look and see if there is something I am doing differently.
Check your markup careful. You might have an unterminated tag somewhere there. That'll always through of the scroll panel. Or there might be some orphaned bit of JavaScript that's causing problems.
On Jan 14, 2013, at 7:34 PM, tommy-carlos williams notifications@github.com wrote:
It's a PhoneGap app on the iOS Sim. However, just loading one of the examples into the iOS sim's browser, the $.main.find('scrollpanel').data('ui-scroller').refresh(); command works as expected.
I will have a look and see if there is something I am doing differently.
—
Reply to this email directly or view it on GitHub.
It would appear that the default download of Zepto is missing some modules in use by chocolatechip-ui.
If I use the one included in the libs dir of chocolatechip-ui it works, but not if I use the version from zeptojs.com