Skip to content
Discussion options

You must be logged in to vote

Hi Valentina! The prompt parameter needs to be an HTML string, whereas you're giving it the file path without any other HTML. To get the image to appear, you'll need to put the image file path inside of an img tag.

prompt​:  ​function()​ ​{if​ ​(val_change_n==0){​ 
    return​ ​'<img src="'+rain+'">';
  }​ ​else​ ​if​ ​(val_change_n==1){​ 
   ​return​ ​'<img src="''sun+'">';
  }}  

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@valentinavellani
Comment options

Answer selected by jodeleeuw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants