I need some help. I have written a javascript that check out the URL and if the url equals example.com then the script should change the height and the margin of a div element. It works but it keeps reloading the site all the time and I can't click on anything.
Also how can I get a class? getElementsByClassName doesnt work.
function verschieben() {
    if (window.location.href = "example.com") {
        document.getElementById('bigimg').style.height = "200px";
        document.getElementById('searchbox').style.marginTop = "30px";
    }
}
verschieben();
 
     
     
    