Top-bottom navigation button
How do I make an top-bottom navigation button?
What is a top-bottom navigation button? How do you make a top-bottom navigation button? This script and codes were developed by Reinis on 06 December 2022, Tuesday.
Top-bottom navigation button - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>top-bottom navigation button</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="blue"></div>
<div id="red"></div> <a href="#red" onclick="toggleVisibility('footerbuttonup');"><div id="footerbuttondown" class="content"></div></a> <a href="#blue" onclick="toggleVisibility('footerbuttondown');"><div id="footerbuttonup" class="content"></div></a>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(document).ready(function(){ // Add smooth scrolling to all links $("a").on('click', function(event) { // Make sure this.hash has a value before overriding default behavior if (this.hash !== "") { // Prevent default anchor click behavior event.preventDefault(); // Store hash var hash = this.hash; // Using jQuery's animate() method to add smooth page scroll // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area $('html, body').animate({ scrollTop: $(hash).offset().top }, 800, function(){ // Add hash (#) to URL when done scrolling (default click behavior) window.location.hash = hash; }); } // End if });
});
</script> <script src="js/index.js"></script>
</body>
</html>
Top-bottom navigation button - Script Codes CSS Codes
body {margin:0px;}
#blue { height:80vh; background-color:blue;
}
#red { height:80vh; background-color:red;
}
#footerbuttondown { bottom: 10px; right: 10px; height: 50px; width:50px; margin: 0; position: fixed; z-index: 999; background-image: url("http://cdn.mysitemyway.com/icons-watermarks/simple-black/raphael/raphael_arrow-down-circle/raphael_arrow-down-circle_simple-black_512x512.png"); background-repeat: no-repeat; background-size: 100% 100%; background-position: center; background-color: rgba(0, 200, 0, 1);
}
#footerbuttondown:hover { background-image: url("http://cdn.mysitemyway.com/icons-watermarks/simple-black/raphael/raphael_arrow-down-circle/raphael_arrow-down-circle_simple-black_512x512.png");
}
#footerbuttonup { bottom: 10px; right: 10px; height: 50px; width:50px; margin: 0; position: fixed; z-index: 999; display: none; background-image: url("http://pngplay.com/wp-content/uploads/2016/07/Up-Arrow-PNG-14-220x220.png"); background-repeat: no-repeat; background-size: 100% 100%; background-position: center; background-color: rgba(0, 200, 0, 1);
}
#footerbuttonup:hover { background-image: url("http://pngplay.com/wp-content/uploads/2016/07/Up-Arrow-PNG-14-220x220.png");
}
Top-bottom navigation button - Script Codes JS Codes
function toggleVisibility(selectedTab) { var content = document.getElementsByClassName('content'); for(var i=0; i<content.length; i++) { if(content[i].id == selectedTab) { content[i].style.display = 'block'; } else { content[i].style.display = 'none'; } } }
Developer | Reinis |
Username | 72 |
Uploaded | December 06, 2022 |
Rating | 3 |
Size | 2,514 Kb |
Views | 10,120 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Splashscreen until document ready | 2,106 Kb |
Simple html js slideshow | 1,692 Kb |
Html rowspan colspan | 1,517 Kb |
Spongebobs | 1,784 Kb |
Stretchy fragile div classes grid frame | 1,669 Kb |
Jquery single page menu | 2,423 Kb |
Fullscreen audio play button | 2,148 Kb |
Transform modes | 1,726 Kb |
Events | 1,472 Kb |
Html5 video overlay play button | 2,033 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Tic Tac Toe | Volv | 4,862 Kb |
TinFoil Boats | Chandralil | 4,577 Kb |
TweenMax transformOrigin Bubble | Nicolund | 2,209 Kb |
Board Site | IndianaLuft | 10,542 Kb |
Menu | Vivi_Lai | 1,210 Kb |
Ball physics | Blackkbot | 3,874 Kb |
Popover Example | Seanboom | 2,429 Kb |
Twitch | SarahDunlap | 2,937 Kb |
Simple star rating using js and data-uri | TheEnd | 5,795 Kb |
Loading Bar | Jaradlight | 2,333 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!