From b768a82d45bbaedca02537a986f9d16111885b47 Mon Sep 17 00:00:00 2001 From: nyeholt Date: Tue, 3 Aug 2010 23:41:41 +1000 Subject: [PATCH] Added a timeout call to update the position of elements once a second. This is to get around the issue with dom updates causing the positioning to get all messed up - and there being no nice way to detect whenever the dom has changed in a nice general manner --- javascript/ss.inlinehelp.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/javascript/ss.inlinehelp.js b/javascript/ss.inlinehelp.js index 3a7e84b..31bf145 100755 --- a/javascript/ss.inlinehelp.js +++ b/javascript/ss.inlinehelp.js @@ -31,6 +31,15 @@ _init: function() { var widget = this; + var updatePosition = function () { + widget.icon.position($.extend(widget.options.iconPosition, { + of: widget.element + })); + } + + $(window).scroll(updatePosition); + var updateInterval = setInterval(updatePosition, 1000); + if (this.options.type == 'link') { this.link = $('') .addClass('ss-inlinehelp-link')