{"id":24199485,"url":"https://github.com/tredmann/jquery.leave-by-side","last_synced_at":"2025-03-03T09:23:58.247Z","repository":{"id":149489627,"uuid":"41564596","full_name":"tredmann/jquery.leave-by-side","owner":"tredmann","description":"A jQuery Plugin to detect on which side the mouse leaves an element","archived":false,"fork":false,"pushed_at":"2015-09-01T12:29:50.000Z","size":144,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T20:41:15.444Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.besserdich-redmann.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tredmann.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-28T19:16:53.000Z","updated_at":"2015-09-01T12:30:28.000Z","dependencies_parsed_at":"2023-04-06T22:17:55.468Z","dependency_job_id":null,"html_url":"https://github.com/tredmann/jquery.leave-by-side","commit_stats":null,"previous_names":["tredmann/jquery.leave-by-side"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tredmann%2Fjquery.leave-by-side","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tredmann%2Fjquery.leave-by-side/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tredmann%2Fjquery.leave-by-side/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tredmann%2Fjquery.leave-by-side/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tredmann","download_url":"https://codeload.github.com/tredmann/jquery.leave-by-side/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241638326,"owners_count":19995168,"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":[],"created_at":"2025-01-13T20:36:32.837Z","updated_at":"2025-03-03T09:23:58.221Z","avatar_url":"https://github.com/tredmann.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jquery.leave-by-side: A jQuery Plugin to detect on which side the mouse leaves an element\n\nThis jQuery plugin provides a basic mechanism to detect on which side the mouse leaves an given element. You can define callback function for every side. Supported sides are top, bottom, left and right.\n\nExample:\n\n\t    $('#element').leaveBySide({\n\t        top: function() {\n\t            console.log('top');\n\t        },\n\t        bottom: function() {\n\t            console.log('bottom');\n\t        },\n\t        right: function() {\n\t            console.log('right');\n\t        },\n\t        left: function() {\n\t            console.log('left');\n\t        }\n\t    });\n\nYou can also access the element which fired the callback. Just pass an elem attribute.\n\nExample:\n\n\t    $('#element2').leaveBySide({\n\t        top: function(elem) {\n\t            elem.css('border-top-color', 'red');\n\t            console.log('top2');\n\t        },\n\t        bottom: function(elem) {\n\t            elem.css('border-bottom-color', 'yellow');\n\t            console.log('bottom2');\n\t        },\n\t        right: function(elem) {\n\t            elem.css('border-right-color', 'blue');\n\t            console.log('right2');\n\t        },\n\t        left: function(elem) {\n\t            elem.css('border-left-color', 'green');\n\t            console.log('left2');\n\t        }\n\t    });\n\nWhen your element is very thin or small and someone moves the mouse very fast, the detection could fail. I figured out a minimum height and width of 20px works good.\n\nFeel free to fork an add additional work. This is just a basic idea which works fine for my use case.\n\nVisit our website: [http://www.besserdich-redmann.com][1] or contact me tr@besserdich-redmann.com also via twitter @tobias\\_redmann\n\n[1]:\thttp://www.besserdich-redmann.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftredmann%2Fjquery.leave-by-side","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftredmann%2Fjquery.leave-by-side","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftredmann%2Fjquery.leave-by-side/lists"}