开发者

using jQuery Positioning... The positioning doesn't stay fixed to the element

I'm using the jQuery positioning plugin from jQuery UI:

http://wiki.jqueryui.com/w/page/12138026/Position

Positioning works well enough to set a item next to an existing item on开发者_运维百科 the page. the problem is if the item on the page moves or goes away, then the positioned item stays there and doesn't get removed or reposition.

Is there a way to make positioning an item dynamic based on the anchor element? Thanks


Position() just sets the element to a position relative to given element one time and doesn't watch for it's movement afterwards. If the element to which you're positioning another one changes position you have to call position() again. If it animates, you'll have to animate both elements.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜