diff --git a/img/mountains.png b/img/mountains.png new file mode 100644 index 0000000..b5d1e8b Binary files /dev/null and b/img/mountains.png differ diff --git a/index.html b/index.html index e35a17b..b09893d 100644 --- a/index.html +++ b/index.html @@ -9,49 +9,8 @@ Parallax Design - - - - + + @@ -75,7 +34,7 @@

Parallax Effect

- +
@@ -88,8 +47,6 @@

Parallax Effect

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Suscipit laborum ea fugiat fuga, eveniet sed, numquam sequi laboriosam veniam obcaecati earum repellat cum in vitae totam iure reiciendis, eius autem id cumque facere? Ullam eum corporis blanditiis vitae itaque iusto aperiam voluptas velit in molestias perferendis reiciendis dolor, animi cupiditate voluptate cumque sint ea, quas optio accusantium quae officiis deleniti nemo! Debitis, libero, nobis, delectus natus ea nisi sint commodi error sequi maiores amet dolor. Nihil reprehenderit quo excepturi labore odit sequi molestiae deleniti illo nostrum ad id explicabo non fuga quos rerum, facere ipsam autem est, nobis, pariatur eum recusandae iste sit a! Modi dicta tempora similique natus recusandae error iste dolor amet ratione quibusdam soluta doloribus porro cumque nesciunt quod maiores sapiente eius est hic illum fuga, sequi consectetur numquam itaque temporibus. Tempore, ratione commodi nam voluptates cum sint explicabo, illo odio aliquid quaerat ut placeat velit itaque!

@@ -97,8 +54,6 @@

Parallax Effect

- -
diff --git a/js/nav.js b/js/nav.js new file mode 100644 index 0000000..18fb05c --- /dev/null +++ b/js/nav.js @@ -0,0 +1,37 @@ +$(document).ready(function() { + $('nav ul').onePageNav({ + currentClass: 'active', + changeHash: false, + scrollSpeed: 750, + scrollThreshold: 0.5, + filter: '', + easing: 'swing', + }); +}); + + +$(document).ready(function() { + $(".navbar-btn").on("click", function() { + $("nav ul").toggleClass("showing"); + }); +}); + +$(window).on("scroll", function() { + if ($(window).scrollTop()) { + $('nav').addClass('dark'); + } + else { + $('nav').removeClass('dark'); + } +}); + +$(window).scroll(function() { + var scrollValue = $(this).scrollTop(); + + $('.header-text').css('transform', 'translate(-50%, -'+(scrollValue/2 + 50)+'%)'); + $('.sun').css('transform', 'translateY(-'+scrollValue/3+'%)'); +}); + +$(document).on("click", "ul li", function() { + $(this).addClass("active").siblings().removeClass("active"); +}); \ No newline at end of file