aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/comments/frontend/mouseoverchanger.js
blob: 6da0dfeb86f0a46bd7ae7deedb07744204448f4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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];
	};
};