I need help!
Let's say that I have an element in my page that changes background-color when scrolled. I wanted to change the color of the a tag inside of it whei it changes the background, I tried to write a thing like this below, but it did't work! How can I tell jquery to act when the background changes?
$(function(){var background=$("backtotop").css('background','black')
if(background=true){$('a').css('color','white')}
if(background=false){$('a').css('color','green')}});
Aucun commentaire:
Enregistrer un commentaire