Closed Dhaval8087 closed 8 years ago
Hi, you need to create an instance per every element. The approach is up to you, the following is just an example:
var scrollbarElements = [].slice.call(document.querySelectorAll('.my-scrollbar'), 0);
scrollbarElements.forEach(function(element) {
new GeminiScrollbar({
element: element
}).create();
});
@noeldelgado :Thanks I will check it and close it
I have a multiple divs which classname is same and I want to apply scrollbar to all div is it possible because if I will use var myScrollbar = new GeminiScrollbar({ element: document.querySelector('.my-scrollbar') }).create();
it will take very first element how I can assign scroll to multiple element