I have a box with 3 links and a fontawesome icon in my code snippet. I want to be able to click on the font icon and make the content slide. Initially, only three links should be shown, but when I click on the arrow, it should display the other icons. When I click on a link, it should show its respective content and hide any other displayed content. Note that I can only have 3 links visible at a time.
If you can help, please do so.
Here is my initial HTML markup:
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css">
<div class="bar">
<div class="latest-games">
<a href="">Latest Games</a>
</div>
<div class="progressive">
<a href="">Progressive</a>
</div>
<div class="video">
<a href="">Video</a>
</div>
<i class="fa fa-angle-right" aria-hidden="true"></i>
</div>
Here is my styling:
.bar{
background-color: black;
display: flex;
padding: 10px 0;
justify-content: center;
a{
text-transform: uppercase;
font-weight: bold;
}
& > div{
width: 30%;
justify-content: center;
text-align: center;
}
i.fa.fa-angle-right {
margin-top: 4px;
color: white;
}
}
Unfortunately, I'm not sure how to get started as my previous sites were created using WordPress, where I relied on plugins for jQuery functionality. Unfortunately, this isn't possible with wordpress right now due to some bad luck.
Here is a link to my codepen: http://codepen.io/Sidney-Dev/pen/qqbojV