Skip to content

Amanp30/thehashlink

Repository files navigation

thehashlink

No more need to have in a page to use hashlinks

Installation

You can install Hashlink via npm:

 npm install thehashlink

Alternatively, you can include it directly in your HTML file:

<script src="https://unpkg.com/thehashlink@1.0.1/dist/bundle.js"></script>

How to use

Create instance

const hashlink = new Hashlink({ scroll: "smooth" });

Methods

new Hashlink({scroll: "smooth"}): Creates a new instance of the Hashlink class and sets smooth scrolling behavior.

hashlink.goto("id"):

hashlink.new("name"):

hashlink.setbyclass("classname", "id"):

hashlink.setbyname("name", "id"):

About

Working with hash URL quick and in easy way

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published