Page 1 of 1

Image swap

Posted: Wed Jun 03, 2015 6:46 am
by Manish Kumar Singh
  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.

Image swap

Posted: Wed Jun 03, 2015 9:37 am
by Evgene Karachevtsev

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...

Image swap

Posted: Thu Jun 04, 2015 6:32 am
by Manish Kumar Singh

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.


Image swap

Posted: Thu Jun 04, 2015 8:56 pm
by Serhii Kulibaba

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


Image swap

Posted: Fri Jun 05, 2015 4:56 am
by Manish Kumar Singh

Hi Sergiy,

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

I am putting click event on the image itself.


Image swap

Posted: Fri Jun 05, 2015 9:57 pm
by Evgene Karachevtsev

Hello Manish,

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