4
I’m developing a scroll bar in JQuery
for an element, a div
, I need the bar to be the right size to scroll, I’m posting the code with the error to see if you help me:
It gets the bar of a non-responsive size, I tried to use $( window ).width()
in the measurement but failed.
What is the right size? Is it the size of the window? You do not set the size of the scroll bar, you set the size of the div where the scroll is
– Miguel
the bar has q be proportional of the content and the size of the div, if the content is larger it is smaller and if the content is smaller it is bigger......
– Alan PS
Um, I don’t quite get it. There’s some example you’re following?
– Miguel
what’s in the codepen
– Alan PS
Dude, you can explain the question better, which exactly is proportional. And it’s not proportional or responsive??
– pmargreff
if you enable the overflow will notice that the bar I created is different from the browser bar and would have to be the same size because it has q function as if it were the browser bar!
– Alan PS