Select Page
<div class="test" style="padding: 1rem;
    font-size: 12px;
    position: absolute;
    left: 0;
    margin-left: 1rem;
    width: 160px;
    top: 50px;
    border: solid 1px #000;
    background-color: #00000055;">
<button onclick="mbStyle1()" style="margin-bottom:.5rem;">Change title style</button>
<button onclick="mbStyle2()">Reset title style</button>
</div>


<script>
function mbStyle1(){
    const titles = document.querySelectorAll('.collection-title');
	titles.forEach(element => {
  	    element.classList.add('modified');
	});
}
function mbStyle2(){
    const titles = document.querySelectorAll('.collection-title');
	titles.forEach(element => {
  	    element.classList.remove('modified');
	});
}
</script>