Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" src="jquery-3.1.1.js"></script>
- <script>
- var num = 120; //number of pixels before modifying styles
- $(window).bind('scroll', function() {
- if ($(window).scrollTop() > num) {
- $('nav').addClass('fixed');
- } else {
- $('nav').removeClass('fixed');
- }
- });
- </script>
- <div id="headwrapper">
- <header>
- <img src="Logo.png">
- <h1>IT TECH</h1>
- </header>
- </div>
- <nav>
- <div id="selector"></div>
- <a class="link1" href="home.htm">
- <p>Home</p>
- </a>
- <a class="link2" href="talen.htm">
- <p>Programmeertalen</p>
- </a>
- <a class="link3" href="computer.htm">
- <p>Computers</p>
- </a>
- <a class="link4" href="richting.htm">
- <p>Richtingen</p>
- </a>
- <a class="link5" href="contact.htm">
- <p>Contact</p>
- </a>
- </nav>
- <div id="element">
- <div id="slider">
- <div title="Banaan" id="foto1">
- <h1>Welcome to</h1><img src="Logo.png">
- <h1>IT TECH</h1></div>
- <div title="Peren" id="foto2"></div>
- <div title="Kiwi's" id="foto3"></div>
- <div title="Aardbeien" id="foto4"></div>
- </div>
- </div>
- <article></article>
- .fixed ~ #slider {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement