Whenever I toggle a switch, certain sections are displayed on the screen. However, when I activate this switch, the column layout suddenly changes to look like the mobile view, with two images stacked vertically instead of side by side. I'm using col-md-6 for each column to occupy 50% of the row in the browser view. Everything seems fine until I toggle the switch, and then they stack one below the other.
https://i.sstatic.net/ejBA7.jpg
https://i.sstatic.net/uDcnL.png
https://i.sstatic.net/gKgv9.png
function showContent() {
var studyContent = document.getElementById("study-content");
var privateContent = document.getElementById("private-content");
var switchInput = document.getElementById("switch");
if (switchInput.checked) {
studyContent.style.display = "block";
privateContent.style.display = "none";
} else {
studyContent.style.display = "none";
privateContent.style.display = "block";
}
}
/* Other JavaScript functions here */