{"id":15658721,"url":"https://github.com/nikku/jquery-controls","last_synced_at":"2025-05-05T16:45:48.863Z","repository":{"id":1625084,"uuid":"2322427","full_name":"nikku/jquery-controls","owner":"nikku","description":"Registration of ajax handlers to bind to certain elements of a page","archived":false,"fork":false,"pushed_at":"2011-09-04T19:55:26.000Z","size":89,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T22:32:12.643Z","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/nikku.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":"2011-09-04T08:45:13.000Z","updated_at":"2022-11-20T15:42:06.000Z","dependencies_parsed_at":"2022-08-31T16:22:14.792Z","dependency_job_id":null,"html_url":"https://github.com/nikku/jquery-controls","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fjquery-controls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fjquery-controls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fjquery-controls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikku%2Fjquery-controls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikku","download_url":"https://codeload.github.com/nikku/jquery-controls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535667,"owners_count":21763987,"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":"2024-10-03T13:13:38.697Z","updated_at":"2025-05-05T16:45:48.838Z","avatar_url":"https://github.com/nikku.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jQuery controls\n===============\n\nSmall [jQuery](http://jquery.com/) plugin which allows other jQuery plugins to \nregister custom click controls on page elements.\n\nFeatures\n--------\n\n* Offers `$.fn.controls.bindings` as an entry point for other jQuery plugins to add custom click controls\n\nRequirements\n------------\n\n* [jQuery](http://jquery.com/) (tested with jQuery \u003e= 1.4.2 but might work with earlier versions)\n\nUsage\n-----\n\nInclude requirements and plugin in the header of your website\n\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003cscript type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js\"\u003e\u003c/script\u003e\n        \u003cscript type=\"text/javascript\" src=\"jquery.controls.js\"\u003e\u003c/script\u003e\n    \u003c/head\u003e\n    \u003c!-- ... --\u003e\n```\n\nRegister controls for a certain element, e.g. a link with `.ajax` as class\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\n    $.extend($.fn.controls.bindings, {\n        \"a.ajax\": function(event) {\n            alert(\"Won't trigger original click: Is an AJAX link!\");\n            event.preventDefault();\n        }\n    });\n\u003c/script\u003e\n```\n\nExecute `.controls()` on an element to bind all matching triggers to it\n\n```html\n\u003cscript type=\"text/javascript\"\u003e\n    // Wait for page load\n    $(function() {\n        // Bind to document\n        $(document).controls();\n    });\n\u003c/script\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fjquery-controls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikku%2Fjquery-controls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikku%2Fjquery-controls/lists"}