Skip to content
This repository was archived by the owner on Jan 24, 2024. It is now read-only.

an3park/shadowreplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Easy lightweight library to replace web content without reloading page

Example

Install

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

Usage

shadowReplace({
  activeLinkAttribute: 'active',
  targetSelector: 'main#shadow',
  linksNodeList: document.querySelectorAll('.link'),
  history: true
})

Property description

property description default
activeLinkAttribute String: provide to add attribute for last clicked link undefined
replaceContainer String: selector for content replacement '#container'
linksNodeList NodeList: links to pages document.querySelectorAll('.link')
history bool: use browser history API true
onprogress function: progress event handler undefined
onloadstart function: loadstart event handler undefined
onloadend function: onloadend event handler undefined

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published