PageSourceSearch

https://alouc.com/wp-content/themes/hocwp-theme/hocwp/js/widget-ta…=7.1.2.pagespeed.ce.NDghjij407.js

js alouc.com collected 2026-10-08 08:35:35 UTC 2,261 bytes, 61 lines download raw bytes

1var widgets = document.getElementsByClassName("hocwp-widget-tabber");
2
3if (widgets.length) {
4    var widgetCount = widgets.length;
5
6    for (var i = 0; i < widgetCount; i++) {
7        var widget = widgets[i],
8            navTabs = widget.getElementsByClassName("nav-tabs")[0],
9            tabTitles = widget.getElementsByClassName("tab-title");
10
11        if (tabTitles.length) {
12            for (var j = 0; j < tabTitles.length; j++) {
13                var titleLink = tabTitles[j],
14                    currentWidget = titleLink.closest(".widget-in-tab"),
15                    li = document.createElement("li");
16
17                titleLink.addEventListener("click", function (e) {
18                    e.preventDefault();
19
20                    var link = this,
21                        item = link.parentNode,
22                        tabs = item.parentNode,
23                        items = tabs.children,
24                        tabPane = document.getElementById(link.getAttribute("href").substr(1)),
25                        tabContent = tabPane.parentNode,
26                        tabPanes = tabContent.children;
27
28                    for (var k = 0; k < items.length; k++) {
29                        items[k].removeAttribute("class");
30                    }
31
32                    for (var l = 0; l < tabPanes.length; l++) {
33                        tabPanes[l].className = tabPanes[l].className.replace(" active", "")
34                    }
35
36                    item.setAttribute("class", "active");
37                    tabPane.className += " active";
38                });
39
40                titleLink.setAttribute("href", "#" + currentWidget.getAttribute("id"));
41
42                li.appendChild(titleLink);
43
44                if (0 == j) {
45                    li.setAttribute("class", "active");
46                    currentWidget.className += " active";
47                }
48
49                navTabs.appendChild(li);
50            }
51        } else {
52            var tabPanes = widget.getElementsByClassName("tab-pane");
53
54            if (tabPanes.length) {
55                for (var l = 0; l < tabPanes.length; l++) {
56                    tabPanes[l].className += " active";
57                }
58            }
59        }
60    }
61}

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.