Skip to content

Commit

Permalink
Added a timeout call to update the position of elements once a second…
Browse files Browse the repository at this point in the history
…. 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
  • Loading branch information
nyeholt committed Aug 3, 2010
1 parent b471cce commit b768a82
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions javascript/ss.inlinehelp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $('<a></a>')
.addClass('ss-inlinehelp-link')
Expand Down

0 comments on commit b768a82

Please sign in to comment.