1

Here is my scenerio. I have a div called container and inside that, there is another div called draggable and there is a scrollbar in it. So, in iPad, the scrollbar will not be visible, so we can write css for -webkit-scrollbar.

Yes, we can do like this https://stackoverflow.com/a/11958657/4913153 But i want it in javascript

So, i want to add the css for the div using javascript only. I used this code https://stackoverflow.com/a/12555370/4913153, but its not working. Is there any way to add the scrollbar for the div in iPad using javascript only

This is my code jsFiddle

Community
  • 1
  • 1
  • I think, as you have already mentioned, [this](http://stackoverflow.com/questions/707565/how-do-you-add-css-with-javascript) should work. Keep in mind, you need at least one stylesheet attached for this to work. – Patel Oct 12 '15 at 06:18
  • is there any other way of doing this without stylesheet? –  Oct 12 '15 at 06:22

0 Answers0