tinyscrollbar icon indicating copy to clipboard operation
tinyscrollbar copied to clipboard

Add the required markup automatically?

Open jayarjo opened this issue 11 years ago • 6 comments

Why won't you make it to add the markup automatically? Like user provides a selector for the container and the rest is done by plugin. Shouldn't add that much code.

jayarjo avatar Feb 22 '14 07:02 jayarjo

For jQuery it could be something as simple as this: https://github.com/wieringen/tinyscrollbar/pull/8

jayarjo avatar Feb 22 '14 08:02 jayarjo

I'm not a big fan of inlining HTML inside my javascript. I prefer to do it this way because it will allow for optimal control and it keeps markup and behaviour separate.

wieringen avatar Feb 22 '14 17:02 wieringen

In this case markup is part of the behavior I think. It's kind of thing that might effectively block others from easily adopting your script.

jayarjo avatar Feb 22 '14 20:02 jayarjo

To me this is really useful and in my implementation I even went further and removed the need to have a forced "viewport" and "overview" elements by assigning the needed CSS while creating the scrollbar. I still haven't modified my code to the latest version of tinyscrollbar, but once I do I will send in a pull request with what I have. It makes it cleaner than #8, and eases adoption of the plugin.

gonchuki avatar Mar 05 '14 18:03 gonchuki

Ok keep me posted im interested to see what you created :)

wieringen avatar Mar 10 '14 13:03 wieringen

@gonchuki any update on this ? :-)

SiteSplat avatar Sep 25 '14 03:09 SiteSplat