Ignore:
Timestamp:
Sep 24, 2013, 10:41:18 PM (11 years ago)
Author:
rvelices
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/themes/default/js/switchbox.js

    r23437 r24612  
    33                jQuery(link).click(function() {
    44                        var elt = jQuery(box);
    5                         elt.css("left", Math.min( jQuery(this).offset().left, jQuery(window).width() - elt.outerWidth(true) - 5))
    6                                 .css("top", jQuery(this).offset().top + jQuery(this).outerHeight(true))
     5                        elt.css("left", Math.min( jQuery(this).position().left, jQuery(window).width() - elt.outerWidth(true) - 5))
     6                                .css("top", jQuery(this).position().top + jQuery(this).outerHeight(true))
    77                                .toggle();
    88                        return false;
Note: See TracChangeset for help on using the changeset viewer.