https://github.com/shaack/linkable-js
Make every HTML-Element linkable by just adding the class `linkable` and a `data-href` attribute
https://github.com/shaack/linkable-js
Last synced: over 1 year ago
JSON representation
Make every HTML-Element linkable by just adding the class `linkable` and a `data-href` attribute
- Host: GitHub
- URL: https://github.com/shaack/linkable-js
- Owner: shaack
- Created: 2019-07-29T15:33:19.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-18T10:07:38.000Z (over 6 years ago)
- Last Synced: 2025-03-08T10:51:57.712Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# linkable-js
Make every HTML Element a link by setting its class to `linkable`.
## Example
```html
This will link to shaack.com
```
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`.
```html
```
Now all elements with `class="linkable"` are links to their
`data-href` attribute.