Skip to content
This repository has been archived by the owner on Jul 1, 2021. It is now read-only.

oscarpalmer/knuff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Knuff

npm version

pushstate and popstate-events, but without the “hassle”.

Getting started

Knuff is available via npm and yarn, but it's just as easy to download the script and including it in your document.

However you'd like to “install” the script, you'll need to add the [data-knuff]-attribute to your anchors and anchor-like elements; the attribute's value should be a URL – or part of one – but if left empty, Knuff will try to find a [href]-attribute. If neither of these attributes have values, Knuff will leave the element alone. Easy peasy! 😎

Older browsers

Knuff uses a few things introduced in later versions of ECMAScript, so if you're unsure of what may or may not be supported, I'd recommend using the script compiled by Babel. ✌️

To-do

  • Docs & demo

License

MIT Licensed. You're free to do pretty much whatever you'd like with Knuff. Enjoy! 😊

About

🛩 pushstate and popstate-events, but without the ”hassle“.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published