• Stars
    star
    883
  • Rank 51,702 (Top 2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 11 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add deep anchor links to your docs.

AnchorJS Build Status

A JavaScript utility for adding deep anchor links (like these) to existing page content. AnchorJS is lightweight, accessible, and has no dependencies.

See Live Examples in the Documentation.

Anchoring links

Installation

Download AnchorJS using npm,

npm install anchor-js

โ€ฆand then include it into your project:

import AnchorJS from 'anchor-js';

const anchors = new AnchorJS();
anchors.add();

You could also include it in your webpage via a CDN like CDNJS or jsDelivr,

<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
<script>
   anchors.add();
</script>

โ€ฆor import it globally with ES Modules:

import 'https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js';

anchors.add();

Usage

See the Documentation for detailed instructions.

Compatibility

Currently Supports: IE9+ and modern browsers

Contributing

To contribute:

  1. Fork/Clone the repo.
  2. Make your changes.
  3. Write tests as needed.
  4. Run tests locally to confirm everything is working:
    • Install test modules: Run npm ci
    • Run all tests: npm test
  5. Minify and prepare the code: npm run build
  6. Submit a Pull Request.

License

Licensed with the MIT License.

More Repositories

1

after-dark-css

Recreating After Dark screensavers in CSS.
CSS
1,167
star
2

checkboxland

Render anything as HTML checkboxes
JavaScript
946
star
3

poor-mans-styleguide

A frontend styleguide for the pragmatic.
HTML
471
star
4

your-life

HTML
249
star
5

franklin

A static site framework for online books.
CSS
140
star
6

twitter-listbot

A simple twitter bot that retweets the contents of a twitter list.
JavaScript
61
star
7

music-box-fun

A web app for making music box songs.
JavaScript
54
star
8

middleman-navtree

For building navigation trees & menus in Middleman.
Ruby
45
star
9

bryanbraun.github.io

My personal website.
HTML
23
star
10

alt-react-demo

Demo for a build-free alternative to React, written in vanilla JS.
JavaScript
18
star
11

connect-four

Connect Four, in Javascript.
JavaScript
17
star
12

lets-get-creative

A collection of high-quality, free, online creativity tools.
TypeScript
12
star
13

infinitely-nested-iframes

I N C E P T I O N
HTML
7
star
14

africa-map-raphael

A Javascript-friendly map of Africa using the Raphael.js library.
7
star
15

tiny-book-of-rules

A online book about the Drupal Rules module, written by Johan Falk.
5
star
16

twitter-timeline-eradicator

This Chrome Extension displays all of Twitter except the Timeline.
JavaScript
4
star
17

writer

A Drupal Blogging Theme For Developers
PHP
3
star
18

hubot-answers

Let Hubot answer your yes/no questions.
CoffeeScript
3
star
19

lit-element-demo

A demo app for exploring a web-component-based React alternative
JavaScript
3
star
20

landmark-articles

My personal list of landmark articles for personal/professional development in the web industry.
HTML
2
star
21

github-wiki-html-test

Testing which html tags are supported in Github Wikis
2
star
22

advent-of-code

My collection of advent of code exercises
TypeScript
2
star
23

petitions-newslink

Tracking public engagement by linking news items to White House petitions.
JavaScript
2
star
24

googly

A chrome extension for adding Googly eyes to any webpage.
JavaScript
1
star
25

propagate

A series of demos about Javascript Events
JavaScript
1
star
26

jTutor

Real-time javascript programming feedback in the browser.
JavaScript
1
star
27

hello

A classy introduction page.
HTML
1
star
28

alchemist

A simple, incomplete javascript game, built as a personal javascript exercise.
JavaScript
1
star
29

gdi-personal-website

Slides for a Girl Develop It workshop: Building a Personal Website with Github Pages
JavaScript
1
star