rbiggs / chocolatechip-ui

Mobile Web App Framework for Webkit Browsers

Home Page:https://chocolatechip-ui.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

$.UIScrollers no longer exists in chui.*.js

devgeeks opened this issue · comments

$.UIScrollers no longer exists. It used to be used by $.UIEnableScrolling but doesn't seem to be anymore. It's still in the documentation, but not the actual code.

$.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...

Screen Shot 2013-01-15 at 2 07 39 PM

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.

That doesn't work. I tried that too :(

.data('ui-scroller') doesn't seem to be returning an object, just a coerced string "[object Object]"

Screen Shot 2013-01-15 at 2 29 49 PM

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