fix switchbox for deeply nested position absolute elements (should use position() instead of offset())

git-svn-id: http://piwigo.org/svn/trunk@24612 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2013-09-24 20:41:18 +00:00
parent c181c32adf
commit d45adcf0b9
+2 -2
View File
@@ -2,8 +2,8 @@
var sbFunc = function(link, box) {
jQuery(link).click(function() {
var elt = jQuery(box);
elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
.css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
elt.css("left", Math.min( jQuery(this).position().left, jQuery(window).width() - elt.outerWidth(true) - 5))
.css("top", jQuery(this).position().top + jQuery(this).outerHeight(true))
.toggle();
return false;
});