aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/comments/frontend/mouseoverchanger.js
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/comments/frontend/mouseoverchanger.js')
-rw-r--r--bootstrap/comments/frontend/mouseoverchanger.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/bootstrap/comments/frontend/mouseoverchanger.js b/bootstrap/comments/frontend/mouseoverchanger.js
new file mode 100644
index 0000000..6da0dfe
--- /dev/null
+++ b/bootstrap/comments/frontend/mouseoverchanger.js
@@ -0,0 +1,23 @@
+// Changes Element.textContent onmouseover and reverts onmouseout (mouseoverchanger.js)
+HashOver.prototype.mouseOverChanger = function (element, over, out)
+{
+ // Reference to this object
+ var hashover = this;
+
+ if (over === null || out === null) {
+ element.onmouseover = null;
+ element.onmouseout = null;
+
+ return false;
+ }
+
+ element.onmouseover = function ()
+ {
+ this.textContent = hashover.locale[over];
+ };
+
+ element.onmouseout = function ()
+ {
+ this.textContent = hashover.locale[out];
+ };
+};