Skip to content

Make every HTML-Element linkable by just adding the class `linkable` and a `data-href` attribute

Notifications You must be signed in to change notification settings

shaack/linkable-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

linkable-js

Make every HTML Element a link by setting its class to linkable.

Example

<div class="linkable" data-href="https://shaack.com">
    This will link to shaack.com
</div>
<script src="src/linkable.js"></script>

The div ist now clickable, has cursor="pointer" and links to shaack.com.

install

Use npm:

npm install -save linkable-js

Or just download this repository.

use

Just include the script linkable.js.

<script src="/node_modules/linkable-js/src/linkable.js"></script>

Now all elements with class="linkable" are links to their data-href attribute.

About

Make every HTML-Element linkable by just adding the class `linkable` and a `data-href` attribute

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published