Fading image out from widget not working

hey guys i’m trying to make an image in a widget fade out when you click on a button located inside the same widget,works fine with text but not with image,would really appreciate the help