{"id":15959094,"url":"https://github.com/nickstenning/moodelegate","last_synced_at":"2026-07-14T22:32:38.916Z","repository":{"id":422420,"uuid":"42337","full_name":"nickstenning/moodelegate","owner":"nickstenning","description":"An implementation of event delegation (with fixes for focus/blur/submit/reset events) written with MooTools.","archived":false,"fork":false,"pushed_at":"2008-08-13T16:33:03.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T07:07:52.150Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/nickstenning.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":"2008-08-13T15:59:39.000Z","updated_at":"2024-03-06T12:09:03.000Z","dependencies_parsed_at":"2022-07-08T01:50:33.332Z","dependency_job_id":null,"html_url":"https://github.com/nickstenning/moodelegate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nickstenning/moodelegate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Fmoodelegate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Fmoodelegate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Fmoodelegate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Fmoodelegate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nickstenning","download_url":"https://codeload.github.com/nickstenning/moodelegate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nickstenning%2Fmoodelegate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35482259,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-14T02:00:06.603Z","response_time":114,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2024-10-07T14:40:19.617Z","updated_at":"2026-07-14T22:32:38.896Z","avatar_url":"https://github.com/nickstenning.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"MooDelegate\n===========\n\nA simple library for event delegation using the \n[MooTools](http://mootools.net) JavaScript library. At its simplest, \ndelegator.js implements a #delegate method on Element, so you can call:\n\n    $('myelement').delegate('li.delete', 'click', function () {\n        this.dispose();\n    });\n\nThis would make sure that any child of 'myelement' that was a list item with \nthe class \"delete\" would be removed from the DOM when it was clicked. This \napplies no matter when the list item was added to the DOM: even if it was \nadded *after* the call to delegate.\n\nA more advanced (and yet simpler) way to use MooDelegate is to use the \nincluded Controller class:\n\nHTML:\n\n    \u003cdiv id=\"textsizeController\"\u003e\n      \u003cspan\u003eHello\u003c/span\u003e\n      \u003ca href=\"#\" id=\"bigger\"\u003eBigger\u003c/a\u003e\n      \u003ca href=\"#\" id=\"smaller\"\u003eSmaller\u003c/a\u003e\n    \u003c/div\u003e\n\nJS:\n\n    var TextSizeController = new Class({\n      Extends: Controller,\n      \n      // ... see examples/textsize.html for the full example.\n      \n      controls: {\n          '#bigger click': function () {\n            this.increaseSize();\n          },\n          '#smaller click': function () {\n            this.decreaseSize();\n          }\n      }\n  \n    });\n\n    window.addEvent('domready', function () {\n      new TextSizeController($('textsizeController'));\n    });\n\n\nOK, so it's a silly example, but you should get the idea. Once you've made\nthat call to new TextSizeController in the above example, you could remove the\n\"bigger\" button from the DOM, to prevent the user making the text bigger, and then put it back in, and it would work just as expected.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickstenning%2Fmoodelegate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnickstenning%2Fmoodelegate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnickstenning%2Fmoodelegate/lists"}