Zordius![]()
Just plug Y.zui.RAScroll into a scrollView. If user flick up or down, the
scrollView will ignore it. If you want a vertical scroll, plug Y.zui.RAscroll
with {horizontal: false} .
Now ZUI RAScroll also support browser native scroll, that means: If the horizontal
scrollView is scrolling, the vertical page scroll will be disabled, too.
Note
host height to ensure the scrollView is horizontal. Or, if Y.zui.RAScroll
be plugged as vertical mode, it will try to ensure the native browser
scroll will not happen by adjust the contentBox height. If the contents in
the scrollView changed, you may need to execute scrollview.hs.syncScroll()
to do the adjustment again.
Known Issue
<script src="http://yui.yahooapis.com/3.8.1/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2013.02.07-15-27'
}).use('gallery-zui-rascroll', function(Y) {
// Make the scrollView become a horizontal scroll.
var scroll = new Y.ScrollView(...).plug(Y.zui.RAScroll);
// Make another scrollView become a vertical scroll.
var scroll2 = new Y.ScrollView(...).plug(Y.zui.RAScroll, {horizontal: false});
// Update scroll size when content changed.
var updateContent = function (C) {
scroll.get('contentBox').set('innerHTML', C);
scroll.zras.syncScroll();
};
});
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info