drop down menu for charts
<!DOCTYPE html>
<html>
<head>
<style>
.dropbtn {
background-color: black;
color: blue;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: red;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: green;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: blue;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: black}
.show {display:block;}
</style>
</head>
<body>
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Charts</button>
<div id="myDropdown" class="dropdown-content">
<a href="https://cryptoforextricks.blogspot.co.ke/p/new-tradingview.html">candle stick</a><br>
<a href="https://cryptoforextricks.blogspot.co.ke/p/market-overview-chart.html">Market Overview</a><br>
<a href="https://cryptoforextricks.blogspot.co.ke/p/blog-page_4.html">Market Quotes</a><br><a href="https://cryptoforextricks.blogspot.co.ke/p/economic-calendar.html">Economic Calendar</a><br><a href="https://cryptoforextricks.blogspot.co.ke/p/forex-cross-rate.html">Forex Cross Rate</a>
</div>
</div>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
</html>
<html>
<head>
<style>
.dropbtn {
background-color: black;
color: blue;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: red;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: green;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: blue;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {background-color: black}
.show {display:block;}
</style>
</head>
<body>
<div class="dropdown">
<button onclick="myFunction()" class="dropbtn">Charts</button>
<div id="myDropdown" class="dropdown-content">
<a href="https://cryptoforextricks.blogspot.co.ke/p/new-tradingview.html">candle stick</a><br>
<a href="https://cryptoforextricks.blogspot.co.ke/p/market-overview-chart.html">Market Overview</a><br>
<a href="https://cryptoforextricks.blogspot.co.ke/p/blog-page_4.html">Market Quotes</a><br><a href="https://cryptoforextricks.blogspot.co.ke/p/economic-calendar.html">Economic Calendar</a><br><a href="https://cryptoforextricks.blogspot.co.ke/p/forex-cross-rate.html">Forex Cross Rate</a>
</div>
</div>
<script>
/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}
// Close the dropdown if the user clicks outside of it
window.onclick = function(event) {
if (!event.target.matches('.dropbtn')) {
var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
var openDropdown = dropdowns[i];
if (openDropdown.classList.contains('show')) {
openDropdown.classList.remove('show');
}
}
}
}
</script>
</body>
</html>
Comments
Post a Comment