Answer the question
In order to leave comments, you need to log in
Guys, what am I doing wrong when changing the image in Vue.js?
I'm just trying to change the picture on hover. (the first image is rendered), the hover works, but instead of the second image I get " localhost:3000/~/assets/img/chrome_icon-white.svg 404 (Not Found)"
a(href="#" class="_available-a" @mouseover="changeIcon")
img(src="~/assets/img/chrome_icon-color.svg",
alt="chrome icon"
ref='icon'
width='25')
changeIcon(){
this.$refs.icon.src = "~/assets/img/chrome_icon-white.svg";
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question