i wanted to change element color by hovering, but when i run the page, it instantly triggers these functions, is there a way to stop it from doing so? It can be seen when reloading pages.
https://jsfiddle.net/9ae0ez2y/
function colorIn(primary){
$("header").css("background-color", primary);
$(".button").css("background-color", primary);
}
function colorOut(secondary){
$("header").css("background-color", secondary);
$(".button").css("background-color", secondary);
}
$("#variables").hover(colorIn("#ffffff"), colorOut("#111111"));