I want to nagivate to a SPECIFIC place on a website by clicking the picture. Can someone help me?
I want to nagivate to a SPECIFIC place on a website by clicking the picture. Can someone help me?
Hi Paco,
1 Select image component in design mode.
2 In image component properties set "className" property to "yourImageLink".
3.1 To navigate to website On Image component Click event add Run JavaScript action with the following code:
pre//Replace http://appery.io with your URL
window.open("http://appery.io", "_blank");/pre
3.2 To navigate to app page On Image component Click event add Run JavaScript action with the following code:
pre
//You should replace "screen28" with your screen name.
navigateTo("screen28");/pre
4 Create new CSS asset with code:
pre
.yourImageLink{
cursor: pointer;
}/pre
Hi Alena,
I tried the code on my app, but when I click on the photo it still goes to the top of the website, and I want it to go to the MIDDLE of the website. So for example when I click on the photo I will go to "To navigate to app page" of this question and not the top of the page. Please help!
Hello!
On click you navigate to external site or app page?
1) If external site, check if there are anсors. You can navigate to this anсors like prehttp://example.com#ancorName/presee name parameter (id for html5) here https://developer.mozilla.org/en-US/d...
There are no other ways with external site
2) If you navigate to your html5 app page, save into localStorage element name where you need to navigate and on page show event using JS scroll app ti the element you need.
So I've tried the code, but do I add the code on number 4 to the code with number 3 or where should I put the code?
Put it in CSS asset, select Create New CSS (from Project view)
http://docs.appery.io/documentation/w...
I used the code, but when I click on the image, it still goes to the top of the page, not directly to the image in the page. How can I go directly to the image not to the top of the page?
Hello,
Please describe in detailes with screen shots what you want to do.
Not sure we understand your goals.
OK so I want my pictures on my app to go to this website: http://pacolau.wix.com/phone-chooser#...
This is a website where I can search about phone specs. There will be a picture of the LG Nexus 5 when you scroll down, and I want the Nexus 5 picture on my app to navigate to the LG Nexus 5 picture on my website when I click on the picture on my app. Is that possible?
@Paco
On your website put an anchor at the point you want to link to.
code<a name="nexus5"></a> /code
Your link from the app will be. http:www.example.com/#nexus5