{"id":22799111,"url":"https://github.com/thomd/js-media-query","last_synced_at":"2025-03-30T19:14:54.465Z","repository":{"id":20153174,"uuid":"23423622","full_name":"thomd/js-media-query","owner":"thomd","description":"detect css-defined media-queries with javascript","archived":false,"fork":false,"pushed_at":"2014-11-09T14:55:04.000Z","size":216,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-05T21:42:48.242Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/thomd.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":"2014-08-28T10:08:45.000Z","updated_at":"2014-09-18T23:01:58.000Z","dependencies_parsed_at":"2022-07-08T07:08:34.654Z","dependency_job_id":null,"html_url":"https://github.com/thomd/js-media-query","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/thomd%2Fjs-media-query","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Fjs-media-query/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Fjs-media-query/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomd%2Fjs-media-query/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomd","download_url":"https://codeload.github.com/thomd/js-media-query/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246365651,"owners_count":20765549,"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-12T07:07:55.169Z","updated_at":"2025-03-30T19:14:54.419Z","avatar_url":"https://github.com/thomd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaScript Media Queries\n\nTrigger JavaScript events on transition of media query breakpoints and keep your media queries in the CSS as the only place.\n\n### Usage\n\n    bower install jquery js-media-query\n\nAdd `onMediaMatch` event listener for a `marker-name` breakpoint using jquery's chaining-syntax. Provide a matching event-handler and an optional non-matching event-handler like this:\n\n    \u003cscript type=\"text/javascript\" src=\"components/jquery/jquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\" src=\"components/js-media-query/dist/mediaquery.js\"\u003e\u003c/script\u003e\n    \u003cscript type=\"text/javascript\"\u003e\n      ...\n      $('#header').onMediaMatch('marker-name', matchingEventHandler, nonMatchingEventHandler);\n    \u003c/script\u003e\n\nImport `breakpoint.sass` in your SASS file and define a `marker-name` breakpoint marker:\n\n    @import 'breakpoint'\n    #header\n      @media screen and (min-width: 768px)\n        @include js-breakpoint('marker-name')\n        ...\n\n### Demo\n\n    grunt demo\n    open http://localhost:8888\n\n### Test\n\n    npm install\n    grunt test\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomd%2Fjs-media-query","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomd%2Fjs-media-query","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomd%2Fjs-media-query/lists"}