Skip to content

Commit

Permalink
adding bower file
Browse files Browse the repository at this point in the history
  • Loading branch information
timhettler committed Jul 22, 2014
1 parent 5ff6efd commit d3c8ada
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 1 deletion.
Empty file modified .gitattributes
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This project was inspired by Brian Cherne's [hoverIntent plug-in](http://cherne.

* If the plug-in fails to load or you decide to remove it, the site won't break; events will just go back to firing immediately.

Instead of simply porting the hoverIntent plug-in to utilize special events, I've simplified the concept dramatically. hoverIntent uses mouse speed as the determining factor that triggers the enter & leave events. This works fine, but there is a lot of overhead involved with this. Mousemove events have to be bound & unbound each time a mouseenter or leave occurs in order to watch the cursor. This leads to some quirky behavior where a user could move their mouse within an element and the enter event suspends indefinitely. The functions associated with tracking and comparing mouse position also adds a considerable amout of code. For these reasons, I think the hoverIntent plug-in is over-engineered for most use-cases.
Instead of simply porting the hoverIntent plug-in to utilize special events, I've simplified the concept dramatically. hoverIntent uses mouse speed as the determining factor that triggers the enter & leave events. This works fine, but there is a lot of overhead involved with this. Mousemove events have to be bound & unbound each time a mouseenter or leave occurs in order to watch the cursor. This leads to some quirky behavior where a user could move their mouse within an element and the enter event suspends indefinitely. The functions associated with tracking and comparing mouse position also adds a considerable amount of code. For these reasons, I think the hoverIntent plug-in is over-engineered for most use-cases.

mouseDelay is built to solve a simple problem: *"When a cursor enters or leaves an element, wait a set amount of time. After that, if the cursor is still inside or outside the element, fire the appropriate event."*

Expand Down
23 changes: 23 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "jQuery-mouseDelay",
"version": "1.0.0",
"homepage": "https://github.com/timhettler/jQuery-mouseDelay",
"authors": [
"timhettler <[email protected]>"
],
"description": "Recode of the hoverIntent plugin that utilizes special events to add functionality to the 'mouseover' and 'mouseout' events, rather than replace them.",
"main": "dist/mouseDelay.min.js",
"keywords": [
"javascript",
"jQuery",
"hoverIntent"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
]
}
Empty file modified dist/mouseDelay.min.js
100644 → 100755
Empty file.
Empty file modified grunt.js
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
Empty file modified src/index.html
100644 → 100755
Empty file.
Empty file modified src/mouseDelay.js
100644 → 100755
Empty file.

0 comments on commit d3c8ada

Please sign in to comment.