質問

How do I link to pages I have created in divshot from the navigation bar, while still staying in the divshot app.

When I preview, I want to be able to click on links in the navigation bar and go to different pages I have created.

役に立ちましたか?

解決

We haven't built in the ability to link between pages in Divshot just yet, unfortunately. It's been one of our most frequently requested features and is something that we're working on putting in soon.

他のヒント

A workaround is to make a function that zaps you to the page you want. When you finish the mockup you will be able to replace the code with the real function that changes the page.

<script>
var pages = [
  {name: 'page1', url: 'https://api.divshot.com/previews/whateverthelinktothepreviewpage1is'},
  {name: 'page2', url: 'https://api.divshot.com/previews/whateverthelinktothepreviewpage2is'}
  ]

function gotoPageByName( pageName ) {
  for ( var i in pages ) {
    if ( pages[i].name == pageName) {
      window.location = pages[i].url
    }
  }
}
</script>

then

<a href="javascript: gotoPageByName('page1');" class="btn">Change Page</a>
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top