0

I have only one list div and I want to make it scrollable. I have seen scrollpane examples, it's great but I am looking for an smaller simpler alternative.

I appreciate any help.

Thanks.

Josh R
  • 1,309
  • 6
  • 19
  • 31

2 Answers2

3

Don't think you need jquery, just add style="overflow:auto;" to the div.

Adam
  • 619
  • 1
  • 4
  • 19
1

For Future readers ...

If jQuery is must then you can do this by :

// Any one accordingly ...

$('#yourIdForDiv').attr('overflow','auto');
$('#yourIdForDiv').attr('overflowy','scroll');
$('#yourIdForDiv').attr('overflowx','auto');
Pramesh Bajracharya
  • 2,153
  • 3
  • 28
  • 54
  • If you'd like to overflow without jquery, keep in mind you can also specify the x&y axis using `"overflow-y:scroll; overflow-x:auto` as an example. Note the "-" as a difference from the jQuery property. – Kenny Powers Jan 05 '18 at 06:55