I am sure some CSS expert may find solution to this with purely CSS, but for discussion sake here is example of using jquery.
Take note you need to first ad the first state css opacity on image in your CSS to run on first hover. Then you can change states on mouse hover.
You can read about hover effect here: https://api.jquery.com/hover/ And about changing CSS https://api.jquery.com/css/
Hope this helps, I'm sure Baby Yoda is pleased.
$( "#fade" ).hover(
function() {
$( "#img" ).css( "opacity", "1" );
$( "#img" ).css( "transition", "0.3s" );
}, function() {
$( "#img" ).css( "opacity", "0.3" );
$( "#img" ).css( "transition", "0.3s" );
}
);
.domicilio {
width:10%;
text-align:center;
padding:5px;
position: relative;
margin-left: 7%;
}
.domicilio img {
max-width: 400%;
opacity: 0.3;
transition: 0.3s;
}
.domicilio button{
position: absolute;
top: 50%;
left: 165%;
/*Aspetto*/
font-family: OldEnglish;
background-color: #803c25;
color: #FFC107;
border-color: #FFC107;
font-size: 30px;
padding: 12px 24px;
cursor: pointer;
border-radius: 5px;
}
.domicilio button:hover{
opacity: 0.3;
transition: 0.3s;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="domicilio">
<img id="img"src="https://miro.medium.com/max/1400/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg">
<a href="https://www.google.it">
<button id="fade">I'm dissappearing, the image behind me should light up</button>
</a>
</div>
EDIT:
ON user request pure JS solution.
document.getElementById("fade").onmouseover = function()
{
document.getElementById("img").style.opacity = "1";
document.getElementById("img").style.transition = "0.3s";
}
document.getElementById("fade").onmouseleave = function()
{
document.getElementById("img").style.opacity = "0.3";
document.getElementById("img").style.transition = "0.3s";
}
.domicilio {
width:10%;
text-align:center;
padding:5px;
position: relative;
margin-left: 7%;
}
.domicilio img {
max-width: 400%;
opacity: 0.3;
transition: 0.3s;
}
.domicilio button{
position: absolute;
top: 50%;
left: 165%;
/*Aspetto*/
font-family: OldEnglish;
background-color: #803c25;
color: #FFC107;
border-color: #FFC107;
font-size: 30px;
padding: 12px 24px;
cursor: pointer;
border-radius: 5px;
}
.domicilio button:hover{
opacity: 0.3;
transition: 0.3s;
}
<div class="domicilio">
<img id="img"src="https://miro.medium.com/max/1400/1*mk1-6aYaf_Bes1E3Imhc0A.jpeg">
<a href="https://www.google.it">
<button id="fade">I'm dissappearing, the image behind me should light up</button>
</a>
</div>