{"id":17125733,"url":"https://github.com/ccampbell/gator","last_synced_at":"2025-04-04T14:05:09.371Z","repository":{"id":5695227,"uuid":"6905725","full_name":"ccampbell/gator","owner":"ccampbell","description":"Event delegation in Javascript","archived":false,"fork":false,"pushed_at":"2017-12-12T22:16:01.000Z","size":269,"stargazers_count":494,"open_issues_count":20,"forks_count":46,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-28T13:05:00.129Z","etag":null,"topics":["event-delegation","events","javascript"],"latest_commit_sha":null,"homepage":"http://craig.is/riding/gators","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ccampbell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-28T16:49:21.000Z","updated_at":"2025-03-23T16:16:28.000Z","dependencies_parsed_at":"2022-09-07T07:01:51.950Z","dependency_job_id":null,"html_url":"https://github.com/ccampbell/gator","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccampbell%2Fgator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccampbell%2Fgator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccampbell%2Fgator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ccampbell%2Fgator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ccampbell","download_url":"https://codeload.github.com/ccampbell/gator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247185919,"owners_count":20898053,"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":["event-delegation","events","javascript"],"created_at":"2024-10-14T18:45:39.659Z","updated_at":"2025-04-04T14:05:09.353Z","avatar_url":"https://github.com/ccampbell.png","language":"JavaScript","readme":"# Gator\n\nGator is a Javascript event delegation library.\n\nIt is around **800** bytes when gzipped and minified and has no external dependencies.\n\n## Browser Support\n\nOut of the box Gator works in\n- Chrome\n- Safari 5+\n- Firefox 3.6+\n- Internet Explorer 9+\n\nThe ``legacy.js`` plugin adds support for\n- Safari \u003c 5\n- Firefox \u003c 3.6\n- Internet Explorer 6, 7, 8\n\n*When using the legacy plugin only single classes, single ids, and single tag names are supported for selectors*\n\n## Getting Started\n\n1.  Include gator on your page before the closing ``\u003c/body\u003e`` tag\n\n    ```html\n    \u003cscript src=\"/path/to/gator.min.js\"\u003e\u003c/script\u003e\n    ```\n\n2.  Add some events\n\n    ```html\n    \u003cscript\u003e\n        // add a click event to document that checks for elements with class expand\n        Gator(document).on('click', '.expand', function(e) {\n            console.log('clicked on', this);\n            return false;\n        });\n\n        // add a click event to document with no delegation\n        Gator(document).on('click', function() {\n            console.log('clicked on document!');\n        });\n\n        // remove all click events on .expand\n        Gator(document).off('click', '.expand');\n\n        // remove all click events on document\n        Gator(document).off('click');\n    \u003c/script\u003e\n    ```\n\n## Documentation\n\nFull documentation is available at http://craig.is/riding/gators\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccampbell%2Fgator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fccampbell%2Fgator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fccampbell%2Fgator/lists"}