Change cursor color javascript3/31/2024 ![]() ![]() ![]() I did it with the following code, but I'm wondering if anyone would do some (or all) of it a different way. I want to make a piece of text fade from black to white while someone puts their mouse over it and change it back to black when they move their mouse away. Set ? null : document.getElementById(target).style.backgroundColor = colors Var rgb = "rgb(" + parseInt(color.substring(1,3), 16) + ", " + parseInt(color.substring(3,5), 16) + ", " + parseInt(color.substring(5,7), 16) + ")" ĭocument.getElementById(target).style.backgroundColor = colors ĭocument.getElementById(target). (demo link of script in current state at bottom)Ĭolors = Would be hugely grateful for any help, thanks so much in advance. If this is more complex than I think it is, I think 3 sets would be plenty. I would use perhaps a different function name in the HTML to call different sets of colors. have been trying to rework this to call additional, independent sets of colors to cycle through (so it would loop thru a set of grays, a set of primary colors, etc). ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |