Reset element color to default stylesheet color (Jquery, Javascript)
- by leaf dev
I need to be able to reset an input field back to its original color after it has been possibly changed via javascript to a different value. The problem is I do not want to hard code the value obviously in case the stylesheet changes. I would like to use the default color used on the page.
Is resetting the color like this fine, or is there a better way to do this?
$('#theinput').css('color', '');