{"id":13601872,"url":"https://github.com/mberneti/jquery-svg","last_synced_at":"2025-04-11T04:31:51.384Z","repository":{"id":89064853,"uuid":"54208530","full_name":"mberneti/jquery-svg","owner":"mberneti","description":"A jQuery plugin to apply css styles and js scripts to a SVG which is embedded (using the \u003cobject\u003e tag).","archived":false,"fork":false,"pushed_at":"2017-05-16T12:10:18.000Z","size":52,"stargazers_count":27,"open_issues_count":1,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-01T18:29:25.256Z","etag":null,"topics":["jquery","jquery-plugin","jquery-svg","js","svg"],"latest_commit_sha":null,"homepage":null,"language":"HTML","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/mberneti.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":"2016-03-18T14:44:29.000Z","updated_at":"2024-07-04T12:58:40.000Z","dependencies_parsed_at":"2023-06-13T19:00:23.676Z","dependency_job_id":null,"html_url":"https://github.com/mberneti/jquery-svg","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/mberneti%2Fjquery-svg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Fjquery-svg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Fjquery-svg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberneti%2Fjquery-svg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mberneti","download_url":"https://codeload.github.com/mberneti/jquery-svg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223458681,"owners_count":17148503,"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":["jquery","jquery-plugin","jquery-svg","js","svg"],"created_at":"2024-08-01T18:01:09.205Z","updated_at":"2025-04-11T04:31:51.372Z","avatar_url":"https://github.com/mberneti.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# jquery-svg\nA lightweight jQuery plugin to apply css styles and js scripts to a SVG which is embedded (using the \u0026lt;object\u003e tag).\n## Usage\n    \n1. Include jQuery:\n\n\t```html\n\t\u003cscript src=\"../lib/jquery.min.js\"\u003e\u003c/script\u003e\n\t```\n\n2. Include plugin's code:\n\n\t```html\n\t\u003cscript src=\"../dist/jquery.svg.es5.min.js\"\u003e\u003c/script\u003e\n\t```\n\n3. Call the plugin:\n\n\t```javascript\n        window.onload = function(){\n            \n                //apply embed css to the svg object\n                $(\"#cars\").setSVGStyle(style);\n                //or\n                //apply css by stylesheet link\n                $(\"#cars\").setSVGStyleLink(stylepath);\n\n                //get svg object, like a jquery object\n                var svg = $(\"#cars\").getSVG();\n                //use jquery functions to do some thing\n                svg.find(\"g path:first-child()\").attr('fill', color);\n                \n            };\n\t```\n\n## Demo\n  - [test with embed css](http://mberneti.github.io/jquery-svg/) \n  - [test with linked css](http://mberneti.github.io/jquery-svg/test-linked-css.html) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberneti%2Fjquery-svg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmberneti%2Fjquery-svg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberneti%2Fjquery-svg/lists"}