I'm not sure why it's not working. Maybe I missed some simple thing? I want to show one div when I use an icon, then hide the other div.
Currently, if I click on the first icon, a div will show. But if I click on the second icon, the div will show and the first icon div will not hide.
You can find an example here.
Here is the HTML code:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<div class="right-lower-container accordion" id="myGroup">
<div class="testing-notification">
<span class="glyphicon glyphicon-comment notification-bar accordion-toggle" data-toggle="collapse" data-target="#testing1" data-parent="#myGroup"></span>
<div id="testing1" class="collapse notification-block">
testing 1
</div>
</div>
<div class="testing-notification">
<span class="btn glyphicon glyphicon-bell notification-bar accordion-toggle" data-toggle="collapse" data-target="#testing2" data-parent="#myGroup"></span>
<div id="testing2" class="collapse notification-block">
testing2
</div>
</div>
<a class="option-font" href="#">
<span>
new items
</span>
</a>
<a class="option-font" href="#">
<span class="glyphicon glyphicon-search">
search
</span>
</a>
</div>
Here is my CSS code:
.right-lower-container {
height: 40%;
width: 100%;
display: block;
vertical-align: top;
text-align: right;
}
.notification-bar {
color: black;
margin-right: 2.5%;
}
.notification-bar:hover {
color: gray;
}
.notification-block {
width: 100px;
height: 100px;
}
.testing-notification {
display: inline-block;
width: 20%;
}
#testing1,#testing2{
background-color:red;
width:100px;
height:200px;
}
.option-font,
.notification-bar,
.testing-notification {
display: inline-block;
vertical-align: top;
}
Additional Question
https://i.sstatic.net/1CkUI.png
How do I style the input type using Bootstrap?
Here is the HTML code:
<form method="post" action="">
<input type = "submit" clas="btn btn-default btn-direct-message" value="message" name="chat">
</form>