frayerjj-frontend 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/init.js +17 -15
package/package.json
CHANGED
package/src/init.js
CHANGED
|
@@ -110,7 +110,7 @@ export const init = () => {
|
|
|
110
110
|
msg.verbose('Enabling Filter Select');
|
|
111
111
|
select.addEventListener('change', ev => {
|
|
112
112
|
msg.verbose('Filter Select Triggered');
|
|
113
|
-
document.querySelectorAll('.filter-
|
|
113
|
+
document.querySelectorAll('.filter-item').forEach(el => {
|
|
114
114
|
el.style.display = '';
|
|
115
115
|
filterSelects.forEach(filter => {
|
|
116
116
|
if (filter.value) {
|
|
@@ -125,20 +125,22 @@ export const init = () => {
|
|
|
125
125
|
|
|
126
126
|
// Scroll to top button
|
|
127
127
|
let toTop = document.getElementById('toTopBtn');
|
|
128
|
-
toTop
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
if (toTop) {
|
|
129
|
+
toTop.style.visibility = "hidden";
|
|
130
|
+
toTop.addEventListener('click', () => {
|
|
131
|
+
msg.verbose('Scrolling to Top');
|
|
132
|
+
scrollTo(0, 0);
|
|
133
|
+
});
|
|
134
|
+
window.addEventListener('scroll', () => {
|
|
135
|
+
if (scrollY > 1500) {
|
|
136
|
+
msg.verbose('Scrolling to Top Button Visible');
|
|
137
|
+
toTop.style.visibility = "visible";
|
|
138
|
+
} else {
|
|
139
|
+
msg.verbose('Scrolling to Top Button Hidden');
|
|
140
|
+
toTop.style.visibility = "hidden";
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
}
|
|
142
144
|
|
|
143
145
|
});
|
|
144
146
|
|