odyniec/imgareaselect — pull request #69 by eliyahen1 (2014-07-31 16:13:38+00:00)
Title: Update jquery.imgareaselect.dev.js

https://github.com/odyniec/imgareaselect/issues/39

It seems that the position of $outer parts are set to fixed when any of the IMG parents is fixed. This is true when you refer relatively to the body element.
But, if you set parent to an explicit element, and no fixed position is in between IMG element and parent element - the position of $outer should be 'absolute'.

Problem is, you determine and set the $outer position before you setSettings. So, the solution is to re-set it after you set options.

I ended up with this change:
In imgLoad function:
$box.add($outer).css({ visibility: '' , position: ($parent[0].tagName !== 'BODY'? 'absolute' : undefined) });