{"id":20251669,"url":"https://github.com/jfmdev/jqeye","last_synced_at":"2025-04-10T23:15:35.163Z","repository":{"id":20188875,"uuid":"23459972","full_name":"jfmdev/jqEye","owner":"jfmdev","description":"jQuery plugin for make eyes that follow the mouse","archived":false,"fork":false,"pushed_at":"2020-10-14T16:55:40.000Z","size":64,"stargazers_count":20,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T23:15:29.247Z","etag":null,"topics":["javascript","jquery","jquery-plugin"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jfmdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-29T09:54:05.000Z","updated_at":"2023-06-23T22:45:11.000Z","dependencies_parsed_at":"2022-08-02T10:37:17.006Z","dependency_job_id":null,"html_url":"https://github.com/jfmdev/jqEye","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqEye","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqEye/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqEye/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jfmdev%2FjqEye/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jfmdev","download_url":"https://codeload.github.com/jfmdev/jqEye/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248312134,"owners_count":21082638,"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":["javascript","jquery","jquery-plugin"],"created_at":"2024-11-14T10:12:11.687Z","updated_at":"2025-04-10T23:15:35.144Z","avatar_url":"https://github.com/jfmdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jqEye\n=====\n\n_Make eyes that follow the mouse_\n\nA jQuery plugin that allows to define a behaviour in which a HTML element moves, within the boundaries of an imaginary eye, in order to follow the mouse.\n\nDemos\n-----\n\nBasic: http://jsfiddle.net/L43zcmq4/4/\n\nAdvanced: http://jsfiddle.net/78ktpaqv/11/\n\nHow to use\n----------\n\n**Step 1:** Add references to the files of [jQuery](https://jquery.com) and [jqEye](/Source/) in the header section of the HTML document.\n\n``` html\n    \u003cscript type=\"text/javascript\" src=\"jquery-1.11.1.min.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"jqeye.js\"\u003e\u003c/script\u003e\n```\n\n**Step 2:** Define, in the body of the HTML document, the element which is going to act as the pupil. \nNote that the initial position of this element is going to be considered as the centre of the eye.\n\n``` html\n    \u003cdiv style=\"width:50px; height:50px; position:relative; border:1px solid gray; border-radius:25px;\"\u003e\n        \u003cdiv id=\"Pupil\" style=\"width:10px; height:10px; left:20px; top:20px; border-radius:5px; background-color:blue; position:relative;\"\u003e\u003c/div\u003e\n    \u003c/div\u003e\n```\n\n**Step 3:** Select the element, using _jQuery_, and invoke the method _jqEye()_.\n\n``` javascript\n    jQuery(document).ready(function() {\n        jQuery(\"#Pupil\").jqEye();\n    });\n```\n\nBy default, the eyes has a circular shape and the pupil can move within a radius of 20 pixels. However this can be changed by using the \"_options_\" parameter:\n\n * The property \"options.shape\" defines the shape of the eye, it can be 'circle', 'ellipse', 'rectangle' and 'rounded rectangle';\n * The property \"options.radius\" defines the radius of the eye, if the shape is a circle, or the radius of his corners, if the shape is a rounded rectangle;\n * The properties \"options.width\" and \"options.height\" defines the width and height of the eye, if the shape is a rectangle or an ellipse.\n\nFor example:\n\n``` javascript\n    jQuery(document).ready(function() {\n        jQuery(\"#Pupil_1\").jqEye({shape: \"circle\", radius:10});\n        jQuery(\"#Pupil_2\").jqEye({shape: \"ellipse\", width:40, height:20});\n        jQuery(\"#Pupil_3\").jqEye({shape: \"rectangle\", width:40, height:20});\n        jQuery(\"#Pupil_4\").jqEye({shape: \"rounded rectangle\", width:40, height:40, radius:10});\n    });\n```\n\nLicense\n-------\n\nThis library is free software; you can redistribute it and/or modify it under the terms of the Mozilla Public License v2.0. \nYou should have received a copy of the MPL 2.0 along with this library, otherwise you can obtain one at \u003chttp://mozilla.org/MPL/2.0/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfmdev%2Fjqeye","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjfmdev%2Fjqeye","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjfmdev%2Fjqeye/lists"}