Changing image on hover with styled height and width?

Is it possible to change image’s width and height in JS, like if my current image is i.e. height 100px and width 100px and second image that appears when i hover over current image is 200px height and 200px width to change it to 100px height and 100px width when hover occurs?

You need to add in css something like:

#myImage {
  width: auto;
  height: 350px;
1 Like

Yes, you have to set the attribute using javascript

1 Like