开发者

How to make a div scrollable using jquery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜