summaryrefslogtreecommitdiffstats
path: root/js/util.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index 293c89a5d..98bafb664 100644
--- a/js/util.js
+++ b/js/util.js
@@ -117,6 +117,24 @@ function bz_getFullWidth(fromObj)
}
/**
+ * Causes a block to appear directly underneath another block,
+ * overlaying anything below it.
+ *
+ * @param item The block that you want to move.
+ * @param parent The block that it goes on top of.
+ * @return nothing
+ */
+function bz_overlayBelow(item, parent) {
+ var elemY = bz_findPosY(parent);
+ var elemX = bz_findPosX(parent);
+ var elemH = parent.offsetHeight;
+
+ item.style.position = 'absolute';
+ item.style.left = elemX + "px";
+ item.style.top = elemY + elemH + 1 + "px";
+}
+
+/**
* Create wanted options in a select form control.
*
* @param aSelect Select form control to manipulate.