{"id":15357571,"url":"https://github.com/cyfung1031/jqdim","last_synced_at":"2026-05-02T09:32:38.881Z","repository":{"id":156134702,"uuid":"400728293","full_name":"cyfung1031/jqDim","owner":"cyfung1031","description":"Provide the traditional dimension methods as jQuery Slim","archived":false,"fork":false,"pushed_at":"2024-03-25T18:02:39.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T18:45:39.670Z","etag":null,"topics":["bliss","dimensions","es6","jquery"],"latest_commit_sha":null,"homepage":"","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/cyfung1031.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-08-28T07:14:34.000Z","updated_at":"2024-01-08T21:04:58.000Z","dependencies_parsed_at":"2024-01-08T22:24:30.474Z","dependency_job_id":"da382544-75af-473e-b930-2d3dc137b2e6","html_url":"https://github.com/cyfung1031/jqDim","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyfung1031%2FjqDim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyfung1031%2FjqDim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyfung1031%2FjqDim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyfung1031%2FjqDim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyfung1031","download_url":"https://codeload.github.com/cyfung1031/jqDim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245865350,"owners_count":20685213,"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":["bliss","dimensions","es6","jquery"],"created_at":"2024-10-01T12:36:35.362Z","updated_at":"2026-05-02T09:32:38.823Z","avatar_url":"https://github.com/cyfung1031.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jqDim\nProvide the traditional dimension methods as jQuery Slim.\n\nIt is suggested to use it with [Vanilla JS](http://vanilla-js.com/), [Bliss](https://blissfuljs.com/), or [Cash](https://github.com/fabiospampinato/cash).\n\nRemarks: jQuery's implementation on dimension APIs is very nice!\n\n## Options\n\n### jQuery 3.5.1 (default)\n* jqDim.reliableTrDimensionsVer = 1\n\n### jQuery 3.6.0 ~ 3.7.1 (see https://github.com/jquery/jquery/issues/5270)\n* jqDim.reliableTrDimensionsVer = 2\n\n## Usage\n\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/cyfung1031/jqDim@3.7.1/release/jqDim-3.7.1.min.js\"\u003e\u003c/script\u003e\n\n\n\u003ca href=\"javascript:void(0);\" onclick=\"ShowElementDimensions();\"\u003eShow element dimensions\u003c/a\u003e\n\u003cdiv id=\"divTestArea1\" style=\"height: 100px; width: 400px; padding: 20px; margin: 3px; border: 1px solid silver; background-color: #eee;\"\u003e\u003c/div\u003e\n\n\u003cscript type=\"text/javascript\"\u003e\nfunction ShowElementDimensions()\n{\n  \n    let elm = document.querySelector(\"#divTestArea1\")\n\tvar result = \"\";\n\n    let dim = window.jqDim(elm)\n\t\n\tresult += \"Dimensions of div: \" + dim.width() + \"x\" + dim.height() + \"\u003c/br\u003e\";\n\tresult += \"Inner dimensions of div: \" + dim.innerWidth() + \"x\" + dim.innerHeight() + \"\u003c/br\u003e\";\t\n\tresult += \"Outer dimensions of div: \" + dim.outerWidth() + \"x\" + dim.outerHeight() + \"\u003c/br\u003e\";\t\n\tresult += \"Outer dimensions of div (with margin): \" + dim.outerWidth(true) + \"x\" + dim.outerHeight(true) + \"\u003c/br\u003e\";\t\n\t\n\t(elm).innerHTML=result;\n    \n}\n\u003c/script\u003e\n\n```\n\n## File Size Reference\n\n| Size               | jDim 3.6.0  | Bliss  | Cash 8.1.0  | jQuery Slim 3.6.0 |\n| ------------------ | ----------- | ---------  | ----------  | ----------------- |\n| Unminified         | 27.1 KB     | 21.1 KB    | 36.5 KB     | 229 KB            |\n| Minified           | 5.97 KB     | 10.7 KB    | 16 KB       | 70.6 KB           |\n| Minified \u0026 Gzipped | 2.59 KB     | 3 KB       | 6 KB        | 24.4 KB           |\n\n| Size               | jDim + Bliss  | jDim + Cash  | jQuery Slim 3.6.0 |\n| ------------------ | ------------- | -----------  | ----------------- |\n| Unminified         | 48.2 KB       | 57.6 KB      | 229 KB            |\n| Minified           | 16.7 KB       | 22 KB        | 70.6 KB           |\n| Minified \u0026 Gzipped | 5.59 KB       | 8.59 KB      | 24.4 KB           |\n\n* jqDim is minified by [Andrew Chilton](https://chilts.org/)'s [JavaScript Minifier](https://javascript-minifier.com/)\n\n## jqDim(element)'s methods [GET]\n* .offset()\n* .position()\n* .scrollTop()\n* .scrollLeft()\n* .width()\n* .height()\n* .innerWidth()\n* .innerHeight()\n* .outerWidth()\n* .outerHeight()\n* .outerWidth(true)\n* .outerHeight(true)\n\n\n## Browser Support\n\n![Edge][edge] | ![Chrome][chrome] | ![Firefox][firefox] | ![IE][ie] | ![Opera][opera] | ![Safari][safari]\n--- | --- | --- | --- | --- | --- |\n 15+ ✔ | 51+✔ | 45+✔ | ✖ | 38+✔ | 10+ ✔ |\n\n[chrome]:  https://raw.githubusercontent.com/alrra/browser-logos/main/src/chrome/chrome_48x48.png \"Chrome\"\n[firefox]: https://raw.githubusercontent.com/alrra/browser-logos/main/src/firefox/firefox_48x48.png \"Firefox\"\n[edge]:    https://raw.githubusercontent.com/alrra/browser-logos/main/src/edge/edge_48x48.png \"Edge\"\n[ie]:      https://raw.githubusercontent.com/alrra/browser-logos/main/src/archive/internet-explorer_9-11/internet-explorer_9-11_48x48.png \"IE\"\n[opera]:   https://raw.githubusercontent.com/alrra/browser-logos/main/src/opera/opera_48x48.png \"Opera\"\n[safari]:  https://raw.githubusercontent.com/alrra/browser-logos/main/src/safari/safari_48x48.png \"Safari\"\n\n## Fix for Dimension Calculation in 3.7.1\n\n![Screen Shot 2024-03-25 at 19 24 47](https://github.com/cyfung1031/jqDim/assets/44498510/4d1b70d3-96b2-4d13-a3fe-b8c475f34519)\n\n## License\n\n### This project is released under MIT License\n* https://raw.githubusercontent.com/cyfung1031/jqDim/main/LICENSE\n\n### Most source codes come from jQuery Slim v3.7.1\n\n\u003e  \n\u003e jQuery JavaScript Library v3.7.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-deprecated/ajax-event-alias,-effects,-effects/Tween,-effects/animatedSelector\n\u003e\n\u003e https://jquery.com/\n\u003e \n\u003e\n\u003e Copyright OpenJS Foundation and other contributors\n\u003e \n\u003e Released under the MIT license\n\u003e \n\u003e https://jquery.org/license\n\u003e\n\u003e Date: 2021-03-02T17:08Z\n\u003e \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyfung1031%2Fjqdim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyfung1031%2Fjqdim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyfung1031%2Fjqdim/lists"}