开发者

Adding items in DOM with jQuery without browser scrollbar update

开发者 https://www.devze.com 2023-02-12 20:40 出处:网络
I am adding many <li> to a <ul> using jQuery with the append method. When there is more <li> than the browser space can accomodate, I expected the vertical scrollbar to enable scrol

I am adding many <li> to a <ul> using jQuery with the append method.

When there is more <li> than the browser space can accomodate, I expected the vertical scrollbar to enable scrolling but it doesn't show at all.

I have tried this in Firefox and Chrome and t开发者_Python百科he effect is the same.


it sounds like you have a css issue. Scrollbars are determined by the css overflow property.

try

#myul {
  overflow:scroll;
}

or

#myul {
  overflow:auto;
}


Finally, the problem was caused because of the ExtJS Layout system I was using...

0

精彩评论

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