Is there a way to hide certain divs when clicking on a specific div box?
Clicking on the box will trigger the hiding of some application divs. See the first image below:
When the boxes are hidden, the other divs will readjust in place of the current divs and then revert back to their standard view. Second image:
Code:
<div class="container">
<div class="row">
<div class="col-md-4" style="text-align: center;">
<button onclick="projectCollab()"><div id="decisionTreeBox" style="font-size: larger;">Collaborate on Projects</div></button>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeBox" style="font-size: larger;">Collaborate on Files</div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeBox" style="font-size: larger;">Collaborate Socially</div>
</div>
</div>
<hr />
<div class="row">
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeOneDrive"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/onedrive-logo.png" style="width: 65px; height: 65px; padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>OneDrive</h3></div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeProject"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/Project.png" style="padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>Project</h3></div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeSharePoint"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/SharePointDecisionTree.png" style="padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>SharePoint</h3></div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeTeams"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/TeamsDecisionTree.png" style="padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>Teams</h3></div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreePlanner"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/PlannerDecisionTree.png" style="padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>Planner</h3></div>
</div>
<div class="col-md-4" style="text-align: center;">
<div id="decisionTreeYammer"><h3 id="innerBoxHeadings"><img src="/TrainingResourceCenter/O365Training/PublishingImages/YammerDecisionTree.png" style="padding-bottom: 5px; padding-right: 10px; vertical-align: middle;"/>Yammer</h3></div>
</div>
</div>
<script>
function projectCollab() {
var x = document.getElementById("decisionTreeOneDrive");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
</div>
Please ignore the JavaScript code provided as it did not seem to work correctly.