Skip to content

ad1b003/push.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

push.js

swap content from another HTML file with transition

How to use

Add inside <head>

<link rel="stylesheet" href="push-transition.css">

then inside <body>

<script src="push.js"></script>

Add push attribute with the link of the HTML page

<button push="content.html">Swap</button>

additional attributes

push-target : Specifies where the fetched HTML will go, Default: <body></body>. Any patterns that work with querySelector will work in push-target

transition : Specifies the type of transition Default: slide-in and another is slide-out

<button push="content.html" push-target="body" transition="slide-out">Swap</button>
See example folder for more

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published