Manish Kumar Singh
Posts: 0
Joined: Fri May 22, 2015 6:22 am

Image swap

  1. Can I use custom icon on button, if yes then How ?
    1. I have an image component, I want to swap image on that, whenever I click on the image, and the resulting change will show immediately.
Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image swap

Hello Manish,

  1. You can do this via css, please check this post:
    https://getsatisfaction.com/apperyio/...
  2. You may use for example Carousel component for this: https://devcenter.appery.io/documenta...
Manish Kumar Singh
Posts: 0
Joined: Fri May 22, 2015 6:22 am

Image swap

Hi Evgene,

I have two image component, in which one is visible, and on click event the visible goes hidden and the another image goes visible.

Appery("mobileimage_242").hide();
Appery("mobileimage_238").show();

Now,
I have a dynamic list item, which is generated dynamically from the database.

Image

The above image change is working fine with the very first record only. But I want it to work with each record individually.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Image swap

Hello Manish,

What component has click event? Is it listitem or grid?
Please add this JS on click event:

pre$(this).find('[name=imageName1]').hide();
$(this).find('[name=imageName2]').show();/pre

here imageName1 and imageName2 - names of image components which you use

Manish Kumar Singh
Posts: 0
Joined: Fri May 22, 2015 6:22 am

Image swap

Hi Sergiy,

The JS you suggested is not working.
Please provide some more suggestion.

I am putting click event on the image itself.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Image swap

Hello Manish,

Could you please check are there any errors in console? This should help:
http://devcenter.appery.io/documentat...

Return to “Issues”