Add the required markup automatically?
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.
For jQuery it could be something as simple as this: https://github.com/wieringen/tinyscrollbar/pull/8
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.
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.
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.
Ok keep me posted im interested to see what you created :)
@gonchuki any update on this ? :-)