PageSourceSearch

https://www.tgchemical.com/Web/Frontend/Composite/Navigation/DropDown/Scripts/DropDown.js

js tgchemical.com collected 2026-10-04 13:28:37 UTC 1,453 bytes, 42 lines download raw bytes

1function DropDown(dropdownId, hoverClass, mouseOffDelay) {
2	if (dropdown = document.getElementById(dropdownId)) {
3		var listItems = dropdown.getElementsByTagName("li");
4		for (var i = 0; i < listItems.length; i++) {
5			if ("ontouchstart" in window || "ontouch" in window) {
6				listItems[i].ontouchstart = function () { this.className = AddClass(this); };
7				listItems[i].ontouchend = function () { var that = this; setTimeout(function () { that.className = RemoveClass(that); }, mouseOffDelay); this.className = that.className; };
8			}
9			else {
10				listItems[i].onmouseover = function () { this.className = AddClass(this); };
11				listItems[i].onmouseout = function () { var that = this; setTimeout(function () { that.className = RemoveClass(that); }, mouseOffDelay); this.className = that.className; };
12			}
13			var anchor = listItems[i].getElementsByTagName("a");
14			anchor = anchor[0];
15			anchor.onfocus = function () { On(this.parentNode); };
16			anchor.onblur = function () { Off(this.parentNode); };
17		}
18	}
19
20	function On(li) {
21		if (li.nodeName == "LI") {
22			li.className = AddClass(li);
23			On(li.parentNode.parentNode);
24		}
25	}
26
27	function Off(li) {
28		if (li.nodeName == "LI") {
29			li.className = RemoveClass(li);
30			Off(li.parentNode.parentNode);
31		}
32	}
33
34	function AddClass(li) {
35		return li.className + " " + hoverClass;
36	}
37
38	function RemoveClass(li) {
39		return li.className.replace(hoverClass, "");
40	}
41
42}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.