Hello everyone! I'm still getting the hang of things around here so please be kind. I need some assistance with my weather app project. Specifically, I've created two buttons and I want to make it so that when one is clicked, the other fades to grey. The idea is that when a user switches from Fahrenheit to Celsius, the Fahrenheit button becomes less opaque and vice versa when switching back. Any guidance or help would be greatly appreciated. Below is the jQuery code I have written for this functionality:
$(document).ready(function(){
$('#Fahrenheit').click(function() {
$('#Celcius').fadeTo("fast", $('#celcius').css("opacity") == "1"?"0.5":"1");
$('#Fahrenheit').fadeTo("fast", $('#Fahrenheit').css("opacity") == "1"?"1":"1");
});
$('#Celcius').click(function(){
$('#Fahrenheit').fadeTo("fast", $('#Fahrenheit').css("opacity") == "1"?"0.5":"1");
$('#Celcius').fadeTo("fast", $('#Celcius').css("opacity") == "1"?"1":"1");
});
});