style problem
Hey alle...Kan jeg ikke gøre sådan hvis man cat_id = 1 så skal background være en anden?
Har prøvet dette:
if (cat_id == 1) {
cat4.style.display = "none";
cat3.style.display = "none";
cat2.style.display = "none";
cat5.style.display = "none";
cat6.style.display = "none";
if (showcat1 == 0) {
cat1.style.display = "block";
cat1.style.background-color = "#000";
showcat1 = 1
}
else {
cat1.style.display = "none";
showcat1 = 0
}
}
--------------------
Virker dog ikke
hedder det noget andet end cat1.style.background-color = "#000"; ???
