Options: scrollbarClass

114 views
Skip to first unread message

michael

unread,
Sep 28, 2010, 10:35:59 AM9/28/10
to iScroll
Was 'scrollbarClass' an option before, or did I imagine it?

The ability to give a custom class name to the scrollbar is helpful.
Right now setting 'hScrollbar' to false still results in a horizontal
scrollbar and a custom class would allow me to hide it.

-Michael

Matteo

unread,
Sep 28, 2010, 10:56:10 AM9/28/10
to iScroll
Yes, scrollbarClass was an option in earlier versions, but I had to
remove it due to the complex new way used to handle the scrollbars
(near-zero resources consumption, but with lesser flexibility). I'm
working on a way to have the stylable scrollbar back.

Anyway, hScrollbar:false should always hide the scrollbar, if it
doesn't I'd have to see your code.

Matteo

michael

unread,
Oct 4, 2010, 2:05:53 PM10/4/10
to iScroll
> Anyway, hScrollbar:false should always hide the scrollbar, if it
> doesn't I'd have to see your code.

Here is a page (though its really on most Article and Sectionfront
pages now in NYTimes.com):
http://www.nytimes.com/pages/travel/index.html

Scroll down to the "Multimedia" and you'll see a collection of 3
images. You should be able to scroll more horizontally.

Until I manually added a class within the iscroll library, it was
showing the scrollbar despite hscroll set to false.

JS files are:

http://graphics8.nytimes.com/js/app/lib/iscroll/3.6.js
http://graphics8.nytimes.com/js/app/lib/iscroll/3.6.min.js (active)
http://graphics8.nytimes.com/js/app/moth/mothController.js

The appropriate line in Moth Controller is:
var sc = new iScroll(mothContainerId, { scrollbarClass:
'mothTouchScroll', vScrollBar: false, hScrollBar: false,
checkDOMChanges: false });

Basically, when I scroll that area on the iPad I get the scroll bar
somewhere above it on the page (so I didn't see it at first).

I've manually added the class "barTouchScroll" with display set to
none in the CSS.

that.wrapper.setAttribute('class', 'barTouchScroll');


-Michael

Matteo

unread,
Oct 4, 2010, 6:07:14 PM10/4/10
to iScroll
Options are case sensitive, the option is hScrollbar not hScrollBar.
Sorry for the confusion and for the honestly bad variables naming.

Matteo


On Oct 4, 8:05 pm, michael <dono...@gmail.com> wrote:
> > Anyway, hScrollbar:false should always hide the scrollbar, if it
> > doesn't I'd have to see your code.
>
> Here is a page (though its really on most Article and Sectionfront
> pages now in NYTimes.com):http://www.nytimes.com/pages/travel/index.html
>
> Scroll down to the "Multimedia" and you'll see a collection of 3
> images. You should be able to scroll more horizontally.
>
> Until I manually added a class within the iscroll library, it was
> showing the scrollbar despite hscroll set to false.
>
> JS files are:
>
> http://graphics8.nytimes.com/js/app/lib/iscroll/3.6.jshttp://graphics8.nytimes.com/js/app/lib/iscroll/3.6.min.js(active)http://graphics8.nytimes.com/js/app/moth/mothController.js

Matteo

unread,
Oct 5, 2010, 10:10:16 AM10/5/10
to iScroll
PS: on v3.7 (released today) you can define the color of the
scrollbar.

Matteo


On Sep 28, 4:35 pm, michael <dono...@gmail.com> wrote:

michael

unread,
Oct 5, 2010, 11:41:22 AM10/5/10
to iScroll
A-ha! Thank you. Very glad it was something so simple. Should have
caught that.

On Oct 4, 6:07 pm, Matteo <mat...@gmail.com> wrote:
> Options are case sensitive, the option is hScrollbar not hScrollBar.
> Sorry for the confusion and for the honestly bad variables naming.
>
> Matteo
>
> On Oct 4, 8:05 pm, michael <dono...@gmail.com> wrote:
>
>
>
> > > Anyway, hScrollbar:false should always hide the scrollbar, if it
> > > doesn't I'd have to see your code.
>
> > Here is a page (though its really on most Article and Sectionfront
> > pages now in NYTimes.com):http://www.nytimes.com/pages/travel/index.html
>
> > Scroll down to the "Multimedia" and you'll see a collection of 3
> > images. You should be able to scroll more horizontally.
>
> > Until I manually added a class within the iscroll library, it was
> > showing the scrollbar despite hscroll set to false.
>
> > JS files are:
>
> >http://graphics8.nytimes.com/js/app/lib/iscroll/3.6.jshttp://graphics...
Reply all
Reply to author
Forward
0 new messages