1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
1 |
+document.addEventListener("DOMContentLoaded", function (event) { |
|
2 |
+if ($(".ce_rsce_onepagenavi.with-smaller-containers").length) { |
|
3 |
+ $("#main").addClass("with-onepage-nav"); |
|
4 |
+} |
|
5 |
+if ($(".ce_rsce_onepagenavi").length) { |
|
6 |
+ $(".onepage-nav--mobile-toggle").click(function () { |
|
7 |
+ $(this).parent("div").toggleClass("visible"); |
|
8 |
+ }); |
|
9 |
+ |
|
10 |
+ $(window).scroll(function () { |
|
11 |
+ var scroll = $(window).scrollTop(); |
|
12 |
+ if (scroll >= $(".ce--onepagenavi").data("offset")) { |
|
13 |
+ $(".ce--onepagenavi").removeClass("d-none"); |
|
14 |
+ } else { |
|
15 |
+ $(".ce--onepagenavi").addClass("d-none"); |
|
16 |
+ } |
|
17 |
+ }); |
|
18 |
+} |
|
19 |
+}); |
|
0 | 20 |
\ No newline at end of file |