Skip to content

Commit

Permalink
Merge pull request #4 from jwanner83/develop
Browse files Browse the repository at this point in the history
fixing readme
  • Loading branch information
jwanner83 authored Jun 9, 2020
2 parents fee5316 + fc82e5c commit f98b82b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ A experimental, dependency free script that let elements follow your cursor with

## Usage
1. Include the `follow.min.js` script to your project
2. Add the `data-follow` attribute to the `position: absolute` elements which you want to follow the cursor
2. Add the `data-follow` attribute to elements which you want to follow the cursor
3. Set the factor on how big they should follow like so `data-follow="100"` (higher equals less movement, if you
leave it empty, it is set to 10.

Expand All @@ -13,7 +13,7 @@ leave it empty, it is set to 10.
2. `<script src"node_modules/follow-js/dist/follow.min.js"></script>`

### unpkg
1. `<script src="https://unpkg.com/[email protected].1/dist/follow.min.js"></script>`
1. `<script src="https://unpkg.com/[email protected].2/dist/follow.min.js"></script>`

## Options
### Dynamically add new elements
Expand All @@ -28,9 +28,6 @@ stay at the exact position on the page as before but will correctly follow the c
if you would like to have a special styling for those.

## Restriction
### position absolute
Currently, the script only works on `position: absolute` elements.

### transition
In the current state, the script won't work properly with a transition on the element.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "follow-js",
"version": "1.1.1",
"version": "1.1.2",
"description": "let elements follow your cursor",
"main": "dist/follow.js",
"repository": {
Expand Down

0 comments on commit f98b82b

Please sign in to comment.