alecpl
2010-10-10 8431a769cd80ba70c2b623751e6deacde3873247
- Align drop down menus under main button (#1487048)


1 files modified
5 ■■■■ changed files
skins/default/functions.js 5 ●●●● patch | view | raw | blame | history
skins/default/functions.js
@@ -124,9 +124,12 @@
    show = false;
  if (show && ref) {
    var pos = $(ref).offset();
    var parent = $(ref).parent(),
      pos = parent.hasClass('dropbutton') ? parent.offset() : $(ref).offset();
    if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight)
      above = true;
    obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) });
  }