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