Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation Enhancements with ID's and URL hashes #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Navigation Enhancements with ID's and URL hashes #30

wants to merge 1 commit into from

Conversation

JacobBennett
Copy link

Important Note

This does not break ANY current functionality. It simply provides users additional options for using your framework.

Summary

Allow users to link directly to ID's of slides instead of specifying an additional data-slide attribute on each.

Also update the URL hash when navigating to slides with IDs. This allows for sharing of specific locations on the page after navigating.

Example

A nav element like this

<li data-slide="about">About</li>

Would link directly to a div like this.

<div class="slide" id="about">This is my about section</div>

This is more semantic as we are describing the content we are linking to rather than assigning it an arbitrary number.

URL Hash Updating

When navigating to a location on the page, the URL hash will also update to the ID of the slide being navigated to. Using the example above, the URL would be updated to

www.example.com/mypage.html#about

which will allow anyone sharing content from the page to direct the recipient to a specific location on a page.

Allow users to link directly to ID's of slides instead of specifiying an additional data-slide attribute on each.

Also update the URL hash when navigating to slides with IDs. This allows for sharing of specific locations on the page after navigating.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant