如何使jQuery Sticky Float插件响应动态页面高度变化? [英] How to make the jQuery Sticky Float plug-in react dynamic page height changes?

查看:98
本文介绍了如何使jQuery Sticky Float插件响应动态页面高度变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我当前正在使用StickyFloat http://plugins.jquery.com/project/stickyfloat并通过jQuery动态更改对象所在的div的高度,更改CSS高度的效果很好,但是StickyFloat无法识别div的新高度,它仅保留原始高度.

I’m currently using StickyFloat http://plugins.jquery.com/project/stickyfloat and am dynamically changing the height of the div the object sits in via jQuery, the changing of the CSS height works perfectly, but StickyFloat doesn’t recognise the new height of the div, it keeps the original height only.

有什么办法可以杀死粘性浮子并重新启用它?通过$('#floatCol').stickyfloat();启用.基本上.
我的问题等同于如何使jQuery Sticky Float插件对页面更改进行实时反应?,这让我很忙.

Is there any way I can kill stickly float and re-enable it again? It’s enabled with $('#floatCol').stickyfloat(); basically.
My question is identical to How to make the jQuery Sticky Float plug-in react live to page changes? and it’s doing my head in big time.

推荐答案

我编写了这个插件,并且以一种神秘的方式看到了这个月才从jQuery存储库中删除了它!无论如何,我有一篇包含所有信息的博客文章,并且重新发布了插件,到目前为止使用事件命名空间对其进行了更新,使其效果更好.

I wrote this plugin, and in a mysterious way I see it was deleted from the jQuery repository just this month! anyway, I have a blog post with all information, and re-posted the plugin, and by now it was updated to work better, utilizing event namespacing.

可以像这样杀死"插件:
注意,如果您有多个浮动菜单,则会杀死所有浮动菜单.

It is possible to just "kill" the plugin like so:
Note, this will kill all the floating menus if you have multiple ones.

$(window).unbind('scroll.sticky')

$(window).unbind('scroll.sticky')


查看有关此插件的博客文章,其中包含链接:

View my blogpost about this plugin which contains the links:

http://dropthebit.com/74/sticky-floating-box/

该插件现在支持将元素粘贴到底部,而不仅仅是顶部

The plugin now supports sticking elements to the bottom and not only to the top

这篇关于如何使jQuery Sticky Float插件响应动态页面高度变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆