image swap
Posted: Wed Jul 22, 2015 5:01 pm
Hi, can you provide an example of javascript code to change the asset of an image on an event? I'm trying to make a basic image swap, but it doesn't seem to be working. Thanks.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Hi, can you provide an example of javascript code to change the asset of an image on an event? I'm trying to make a basic image swap, but it doesn't seem to be working. Thanks.
Hi james,
You can use prop method with 'src' attribute:
code
Apperyio("<image>").prop('src', '<img_src>');
/code