开发者

jQuery fixed content that scrolls if larger than view

开发者 https://www.devze.com 2023-03-12 18:53 出处:网络
This is hard to explain but if you go here: https://developers.facebook.com/docs/reference/api/ You will see that BOTH the sidebar and header are fixed but because the height of the sidebar may be la

This is hard to explain but if you go here: https://developers.facebook.com/docs/reference/api/

You will see that BOTH the sidebar and header are fixed but because the height of the sidebar may be larger than the viewport it scrolls slightly until the user has been able to view all of it and then becomes fixed again.

开发者_开发问答

My question is how could I do something like this with jQuery? I have built similar things using just CSS but would like to overcome the problem with the sidebar.

Thanks


Can't log into facebook but I think you mean something like this?

http://jsfiddle.net/b43hj/24/

If so, that's quick and dirty but should get you started. My have a few kinks to work out.

0

精彩评论

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