{"id":22792762,"url":"https://github.com/johnantoni/jquery.onfontresize","last_synced_at":"2025-04-16T15:51:15.633Z","repository":{"id":785197,"uuid":"480405","full_name":"johnantoni/jquery.onfontresize","owner":"johnantoni","description":"uses an iframe, sized in ems, to detect font size changes and trigger a \"fontresize\" event","archived":false,"fork":false,"pushed_at":"2015-05-30T22:41:18.000Z","size":99,"stargazers_count":13,"open_issues_count":2,"forks_count":4,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T05:32:54.746Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.tomdeater.com/jquery/onfontresize/","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/johnantoni.png","metadata":{"files":{"readme":"README.txt","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":"2010-01-20T10:26:24.000Z","updated_at":"2019-03-25T17:35:19.000Z","dependencies_parsed_at":"2022-08-16T10:50:48.889Z","dependency_job_id":null,"html_url":"https://github.com/johnantoni/jquery.onfontresize","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/johnantoni%2Fjquery.onfontresize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fjquery.onfontresize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fjquery.onfontresize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fjquery.onfontresize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnantoni","download_url":"https://codeload.github.com/johnantoni/jquery.onfontresize/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249257089,"owners_count":21239125,"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-12-12T03:16:00.240Z","updated_at":"2025-04-16T15:51:15.615Z","avatar_url":"https://github.com/johnantoni.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tested with jQuery 1.2.3+ in: IE6/7, FF2 (Windows XP), FF2 (OS X), Safari 2.0.4\n\n    * uses an iframe, sized in ems, to detect font size changes and trigger a \"fontresize\" event\n    * heavily based on code by Hedger Wang: http://www.hedgerwow.com/360/dhtml/js-onfontresize.html\n    * \"fontresize\" event is triggered on the document object\n    * subscribe to event using: $(document).bind(\"fontresize\", function (event, data) {});\n    * \"data\" contains the current size of 1 em unit (in pixels)\n\nNOTE: Unlike any other \"onfontresize\" technique I've seen, Hedger's doesn't use a setInterval-style polling mechanism to detect the font size. Instead, it leverages browser native onresize events that are fired when a hidden iframe is sized in ems.\n\nKNOWN ISSUES: Depending upon how the base font size in your document is specified (em, %, or keyword) the \"pixels per em\" calculation may not be consistent across browsers. Also, the event doesn't fire in IE if fonts are sized in px units.\n\n// execute this code then use the browser\n// font controls to see the event in action\n\n$(document).bind(\"fontresize\", function (event, data) {\n\t$(\"#log\").val(data + \"px\");\n});","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fjquery.onfontresize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnantoni%2Fjquery.onfontresize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fjquery.onfontresize/lists"}