These are the div's that I would like to replace:
The Html:
<div class="row" id="goodPageTopics">
<div class="col-md-12 text-center">
<ul class="list-unstyled text-center">
<li class="filter btn btn-primary" data-filter="all">ALL</li>
<li class="filter btn btn-primary" data-filter=".branding">POLITICS</li>
<li class="filter btn btn-primary" data-filter=".design">ETHICS</li>
<li class="filter btn btn-primary" data-filter=".development">MISCALULATIONS</li>
</ul>
</div>
<div class="mix branding col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project1.png" />
<a href="#project-1">
<div class="img-info bg-primary">Click to see more info</div>
</a>
</div>
</div>
<div class="mix development col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project2.png" />
<a href="#project-2">
<div class="img-info bg-success">Click to see more info</div>
</a>
</div>
</div>
<div class="mix design col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project3.png" />
<a href="#project-3">
<div class="img-info bg-warning">Click to see more info</div>
</a>
</div>
</div>
<div class="mix branding col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project4.png" />
<a href="#project-4">
<div class="img-info bg-danger">Click to see more info</div>
</a>
</div>
</div>
<div class="mix design col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project5.png" />
<a href="#project-5">
<div class="img-info bg-info">Click to see more info</div>
</a>
</div>
</div>
<div class="mix seo col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project6.png" />
<a href="#project-6">
<div class="img-info bg-primary">Click to see more info</div>
</a>
</div>
</div>
<div class="mix design col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project7.png" />
<a href="#project-7">
<div class="img-info bg-success">Click to see more info</div>
</a>
</div>
</div>
<div class="mix seo col-md-3">
<div class="img-wrapper">
<img class="img-responsive" src="images/projects/project8.png" />
<a href="#project-8">
<div class="img-info bg-warning">Click to see more info</div>
</a>
</div>
</div>
</div>
The button is what triggers the divs to be switched out I have already made the other divs but I have made them hidden so they show up untill they are wanted
JavaScript:
document.getElementById('change-page').addEventListener('click', function () {
toggle(document.querySelectorAll('.goodPageTopics'));
});
function toggle(elements, specifiedDisplay) {
var element, index;
elements = elements.length ? elements : [elements];
for (index = 0; index < elements.length; index++) {
element = elements[index];
if (isElementHidden(element)) {
element.style.display = '';
// If the element is still hidden after removing the inline display
if (isElementHidden(element)) {
element.style.display = specifiedDisplay || 'block';
}
} else {
element.style.display = 'none';
}
}
function isElementHidden(element) {
return window.getComputedStyle(element, null).getPropertyValue('display') === 'none';
}
};
Also the Nav for the topics switch the divs around using data-filters and I'm not quite sure how they work but they flip out if I do anything with em so if any has information on that it would be much appreciated.
In addition to that I am using bootstrap and would be willing to accept a Jquery answer but JavaScript is preferred.