Skip to content

Instantly share code, notes, and snippets.

@Lewiscowles1986
Last active July 5, 2017 14:45
Show Gist options
  • Save Lewiscowles1986/ba8c0a7a69b3d4178a5af19b6dde486f to your computer and use it in GitHub Desktop.
Save Lewiscowles1986/ba8c0a7a69b3d4178a5af19b6dde486f to your computer and use it in GitHub Desktop.
Keyboard Gallery Navigation
@Lewiscowles1986
Copy link
Author

  • Whatever your links are inside should have class="nav controls"
  • You make your next links always have class="link next"
  • You make your pev links always have class="link prev" (you can uncomment line 11 if there are no previous links)
  • You make your link to the gallery index, home or landing-page etc, always have class="link up"

Example

<ul class="nav controls">
    <li class="link prev"><a href="/wherever the last image was">Prev</a></li>
    <li class="link up"><a href="/wherever the place you reach the images / first images from most likely">Thumbs Gallery</a></li>
    <li class="link next"><a href="/wherever the next image is">Next</a></li>
</ul>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment