开发者

How to make a div scrollable using jquery

开发者 https://www.devze.com 2023-01-26 12:21 出处:网络
I have only one list div and I want to make it scrollable. I have seen scrollpane examples, it\'s great b开发者_运维百科ut I am looking for an smaller simpler alternative.

I have only one list div and I want to make it scrollable. I have seen scrollpane examples, it's great b开发者_运维百科ut I am looking for an smaller simpler alternative.

I appreciate any help.

Thanks.


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


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');
0

精彩评论

暂无评论...
验证码 换一张
取 消