ventos / beamjs

Creates menu items for all elements in a given area.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

beamjs

Creates menu items for all elements in a given area.

beamjs.add(element, menu, area);

example:

beamjs.add("h3", "menu", "content");

the area is optional, so you could also do this for all elements on the site:

beamjs.add("h3", "menu");

Quite cool?
But the best thing is, clicking on such an item will beam you right to the element.

Usage

<script type="text/javascript" src="path/to/beam.js"></script>

Troubleshooting

The site's header hides the element?
Here is the solution:

Tell beamjs the height in px:

beamjs.setHeaderSize(64);

or the header's name:

beamjs.setHeaderSizeById("header");

About

Creates menu items for all elements in a given area.

License:MIT License


Languages

Language:JavaScript 100.0%