{"id":13397636,"url":"https://github.com/tristen/hoverintent","last_synced_at":"2025-04-09T07:01:55.025Z","repository":{"id":5123931,"uuid":"6289100","full_name":"tristen/hoverintent","owner":"tristen","description":":mouse: Fire mouse events when a user intends it","archived":false,"fork":false,"pushed_at":"2023-04-14T22:24:52.000Z","size":148,"stargazers_count":331,"open_issues_count":15,"forks_count":54,"subscribers_count":8,"default_branch":"gh-pages","last_synced_at":"2025-04-02T05:13:48.675Z","etag":null,"topics":["hoverintent","javascript","mouse","ui"],"latest_commit_sha":null,"homepage":"https://tristen.ca/hoverintent/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"meshbird/meshbird","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tristen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2012-10-19T03:02:53.000Z","updated_at":"2024-06-05T16:07:49.000Z","dependencies_parsed_at":"2023-07-06T01:53:01.365Z","dependency_job_id":null,"html_url":"https://github.com/tristen/hoverintent","commit_stats":{"total_commits":92,"total_committers":16,"mean_commits":5.75,"dds":0.4347826086956522,"last_synced_commit":"ae8ac39054d39a46d34f66feb31354e3bd1f7ab3"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristen%2Fhoverintent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristen%2Fhoverintent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristen%2Fhoverintent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tristen%2Fhoverintent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tristen","download_url":"https://codeload.github.com/tristen/hoverintent/tar.gz/refs/heads/gh-pages","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247994118,"owners_count":21030050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hoverintent","javascript","mouse","ui"],"created_at":"2024-07-30T18:01:36.003Z","updated_at":"2025-04-09T07:01:54.996Z","avatar_url":"https://github.com/tristen.png","language":"HTML","readme":"hoverintent\n---\n\nhoverintent is a reworking of Brian Cherne's [jQuery plugin](http://cherne.net/brian/resources/jquery.hoverIntent.html)\nin plain javascript. It has no dependencies.\n\nIt's goal is to determine a user's intention when hovering over an element by triggering a mouseover event when the cursor position\nhas slowed down enough.\n\n[Check out the demo](http://tristen.ca/hoverintent) to see how it works in action.\n\n### Browser Support\n\n| \u003cimg src=\"http://i.imgur.com/dJC1GUv.png\" width=\"48px\" height=\"48px\" alt=\"Chrome logo\"\u003e | \u003cimg src=\"http://i.imgur.com/o1m5RcQ.png\" width=\"48px\" height=\"48px\" alt=\"Firefox logo\"\u003e | \u003cimg src=\"http://i.imgur.com/8h3iz5H.png\" width=\"48px\" height=\"48px\" alt=\"Internet Explorer logo\"\u003e | \u003cimg src=\"http://i.imgur.com/iQV4nmJ.png\" width=\"48px\" height=\"48px\" alt=\"Opera logo\"\u003e | \u003cimg src=\"http://i.imgur.com/j3tgNKJ.png\" width=\"48px\" height=\"48px\" alt=\"Safari logo\"\u003e |\n|:---:|:---:|:---:|:---:|:---:|\n| All ✔ | All ✔ | 9+ ✔ | 7+ ✔ | All ✔ |\n\n### Basic usage\n\n#### Adding hoverintent to an element\n\n``` html\n\u003cscript src='hoverintent.min.js'\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var el = document.getElementById('element-id');\n  hoverintent(el,\n  function() {\n    // Handler in\n  }, function() {\n    // Handler out\n  });\n\u003c/script\u003e\n```\n\n#### Removing hoverintent from an element\n\n``` html\n\u003cscript src='hoverintent.min.js'\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var el = document.getElementById('element-id');\n\n  // Save a reference to the method\n  var hoverListener = hoverintent(el,\n  function() {\n    // Handler in\n  }, function() {\n    // Handler out\n  });\n\n  // Remove hoverintent listeners\n  hoverListener.remove();\n\u003c/script\u003e\n```\n\n### Custom options\nYou can adjust mouse sensitivity or the length of time a mouse over/out event is fired:\n\n``` html\n\u003cscript src='hoverintent.min.js'\u003e\u003c/script\u003e\n\u003cscript\u003e\n  var opts = {\n    timeout: 500,\n    interval: 50\n  };\n\n  var el = document.getElementById('element-id');\n  hoverintent(el,\n  function() {\n    // Handler in\n  }, function() {\n    // Handler out\n  }).options(opts);\n\u003c/script\u003e\n```\n\n| Setting | Default Value | Description |\n| ---- | ---- | ---- |\n| sensitivity | \u003cpre\u003esensitivity: 7\u003c/pre\u003e | The value (in pixels) the mouse cursor should not travel beyond while hoverintent waits to trigger the mouseover event. |\n| interval | \u003cpre\u003einterval: 100\u003c/pre\u003e | The length of time (in milliseconds) hoverintent waits to re-read mouse coordinates. |\n| timeout | \u003cpre\u003etimeout: 0\u003c/pre\u003e | The length of time (in milliseconds) before the `mouseout` event is fired. |\n| handleFocus | \u003cpre\u003ehandleFocus: false\u003c/pre\u003e | Adds onOver/onOut callbacks to keyboard navigation during blur and focus events |\n\n### Ender support\nAdd `hoverintent` as an internal chain method to your [Ender](https://github.com/ender-js/Ender) compilation.\n\n``` js\n// ender add hoverintent\n\n$('.element').hoverintent(function() {\n    // Handler in\n}, function() {\n    // Handler out\n});\n```\n\n### Building\n\nto manage dependencies and build. Development requires you\nhave [node.js](http://nodejs.org) installed.\n\n1. [Install node.js](http://nodejs.org/). 'Install' will download a package for\nyour OS.\n3. Run `npm install`\n4. Run `npm run build`\n\n### Licence\n\n     _____\n    \u003c MIT \u003e\n     -----\n            \\   ^__^\n             \\  (oo)\\_______\n                (__)\\       )\\/\\\n                    ||----w |\n                    ||     ||\n\n### Bugs?\n\n[Create an issue](https://github.com/tristen/hoverintent/issues)\n","funding_links":[],"categories":["HTML"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristen%2Fhoverintent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftristen%2Fhoverintent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftristen%2Fhoverintent/lists"}