dimanche 28 décembre 2014

JS - can't change color but can change display property


Not sure why this isn't working. This is the rendered HTML:



<h2 id="step-3-question">...and for how much?</h2>


So just in the console, I'm running:



$('#step-3-question')[0].style.display = "none"


Which works fine, so the element is being found, BUT these do not have any effect:



$('#step-3-question')[0].style.color = "white"
$('#step-3-question')[0].style.color = "#000000"


Any thoughts on why?





Aucun commentaire:

Enregistrer un commentaire