Mani Maran
Posts: 0
Joined: Tue Jul 21, 2015 12:49 am

change image by click

Hey, I'm planing to change image by click! Concept is (single page) In my welcome page top left icon called menu icon if i click menu icon it wants to open panel so open panel event expires, on the same page and same position of menu icon The second image called back icon wants to appear if i hit click on back icon the opened panel wants to close the panel and then again menu icon wants to appear on the same place, Give me a hint to do? Image

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

change image by click

Hello Mani,

You can change image's src attribute on click event:

Apperyio("imageName").attr("src", Apperyio.getImagePath("newImage.png"));

here newImage.png - file from the Media Manager

Mani Maran
Posts: 0
Joined: Tue Jul 21, 2015 12:49 am

change image by click

Hello Mr. Sergiy Kullibaba
I can't able to figure it out where do i start just give me little more description to do,
whether i wanna edit in events or select action using run javascript and then edit? i understand the syntax but just give an example to clearly understand

Mani Maran
Posts: 0
Joined: Tue Jul 21, 2015 12:49 am

change image by click

I applied those syntax successfully using js, but nothing happened it remains same what else i do?

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

change image by click

You should add action "Run JavaScript" on the click "event".
More information in our documentation: https://devcenter.appery.io/documenta...

Mani Maran
Posts: 0
Joined: Tue Jul 21, 2015 12:49 am

change image by click

Hello Mr.Sergey Kulibaba,

ya it works but if once image changes to second image. it doesn't return back to first image when the panel closes, i set the property through events it doesn't working?

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

change image by click

You should add handler on event "Panel close" where change image from second to the first.

Mani Maran
Posts: 0
Joined: Tue Jul 21, 2015 12:49 am

change image by click

i already added those too no improvements, in events if the panel close i set the property from back icon to home icon

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

change image by click

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

Return to “Issues”