appleple / scroll-hint

A JS library to suggest that the elements are scrollable horizontally, with the pointer icon.

Home Page:https://appleple.github.io/scroll-hint/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event listeners don't seem to register correctly if the .js-scrollable element was added via JavaScript

JacobDB opened this issue · comments

This morning I was working on an old site that I can't add the <div class="js-scrollable"> server-side, so I add it via JavaScript. The icon gets inserted, and the element is properly scrollable, but the icon doesn't actually appear. I also tested with the suggestiveShadow option, and again, the shadow is inserted on the right side, but never fades out or fades in on the left side.

Seems like this may be a solution, but I'm not sure of the performance implications. Maybe it could be an option?

Demo page: http://bartlettparkdistrict.com/facilities/banquets-rentals/bartlett-community-center.aspx

Seems there may be no viable solution actually. Hmm.

Figured out a solution, will submit a pull request.

Hope this get live. I see the same problem in test page. Do you have a demo with your fix?