Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' of https://github.com/henrythewasp/stalker into…

… henrythewasp-master

Conflicts:
	jquery.stalker.js
  • Loading branch information...
commit 455396e3461317144c265423812754f287f60127 2 parents 603477a + bb30035
@mattwiller mattwiller authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 jquery.stalker.js
View
6 jquery.stalker.js
@@ -117,7 +117,7 @@
{
// give the element custom style while stalking; by default,
// force the element to have its original width and appear on top
- var basicStalkerCSS = {width: me._baseWidth + 'px', 'z-index': stalkerZIndex};
+ var basicStalkerCSS = {width: me._baseWidth + 'px', left: me._baseOffset.left + 'px', 'z-index': stalkerZIndex};
if (typeof me.options.stalkerStyle == 'object')
{
me.jElement.css($.extend(basicStalkerCSS, me.options.stalkerStyle));
@@ -246,11 +246,13 @@
me._baseWidth = me.placeholder.width();
}
- me.jElement.width(me._baseWidth);
+ me._baseOffset = me.placeholder.offset();
+ me.jElement.width(me._baseWidth).css('left', me._baseOffset.left+'px');
}
else
{
me._baseWidth = me.jElement.width();
+ me._baseOffset = me.jElement.offset();
}
stalk();
}
Please sign in to comment.
Something went wrong with that request. Please try again.