+ 1
Can you change the type of output given from an alert of the css background color in JQuery?
Ex. Alert($("#txt").css("background-color");) ; where the css is: #txt {background-color: red;} This alerts 'rgb(255, 0, 0)' Can I change this to say 'red' or '#FF0000'
4 Answers
+ 4
Thank you for mentioning me in your code.
https://code.sololearn.com/W93KJ9J18D3b/?ref=app
https://code.sololearn.com/WJbpggUemxxY/?ref=app
+ 3
Also thanks Chris Coder for the advise, you can check out this code in action on my 'rgb to hex color converter' code bit!
+ 2
Yes, Perhaps you may find an answer here.
https://stackoverflow.com/questions/1740700/how-to-get-hex-color-value-rather-than-rgb-value
If none of the answers work let me know.
+ 1
Hey seemed to work very effectively! To be honest I do not exactly understand those syntaxes but if it works it works