I'd like to check the document for a specific ID. If the ID exists, I want to change the margin of a completely different class on the same page. I'm at a loss as to why it's not working. Maybe it's not even possible?
I've tried several different versions of the same type of coding below, so I'm guessing I'm way off base...
var a = document.getElementById('CommunityTabsContainer');
var b = document.getElementsByClassName('librarysearch');
if (a != null) {
b.style.marginTop = "-68px";
} else {
b;
}