{"id":13904650,"url":"https://github.com/naver/egjs-visible","last_synced_at":"2025-07-18T02:31:55.874Z","repository":{"id":20284440,"uuid":"88965345","full_name":"naver/egjs-visible","owner":"naver","description":"A class that checks if an element is visible in the base element or viewport.","archived":true,"fork":false,"pushed_at":"2023-03-03T21:24:53.000Z","size":1581,"stargazers_count":53,"open_issues_count":8,"forks_count":6,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-11-09T11:12:22.603Z","etag":null,"topics":["egjs","visible"],"latest_commit_sha":null,"homepage":"https://naver.github.io/egjs-visible/","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/naver.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,"dei":null}},"created_at":"2017-04-21T09:11:02.000Z","updated_at":"2024-02-26T21:39:31.000Z","dependencies_parsed_at":"2024-03-31T07:46:14.372Z","dependency_job_id":null,"html_url":"https://github.com/naver/egjs-visible","commit_stats":{"total_commits":65,"total_committers":6,"mean_commits":"10.833333333333334","dds":0.6307692307692307,"last_synced_commit":"18babc68301ce9b83f306298798f952cd99f3078"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-visible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-visible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-visible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naver%2Fegjs-visible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naver","download_url":"https://codeload.github.com/naver/egjs-visible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226336358,"owners_count":17608820,"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":["egjs","visible"],"created_at":"2024-08-06T23:00:59.897Z","updated_at":"2024-11-25T13:30:34.430Z","avatar_url":"https://github.com/naver.png","language":"HTML","funding_links":[],"categories":["HTML"],"sub_categories":[],"readme":"# egjs-visible [![npm version](https://badge.fury.io/js/%40egjs%2Fvisible.svg)](https://badge.fury.io/js/%40egjs%2Fvisible) [![Build Status](https://travis-ci.org/naver/egjs-visible.svg?branch=master)](https://travis-ci.org/naver/egjs-visible) [![Coverage Status](https://coveralls.io/repos/github/naver/egjs-visible/badge.svg?branch=master)](https://coveralls.io/github/naver/egjs-visible?branch=master)\n\nA class that checks if an element is visible in the base element or viewport.\n\n## Documents\n- [Get Started and Demos](https://naver.github.io/egjs-visible/)\n- [API documentation](https://naver.github.io/egjs-visible/release/latest/doc/)\n\n## Download and Installation\n\nDownload dist files from repo directly or install it via npm. \n\n### For development (Uncompressed)\n\nYou can download the uncompressed files for development\n\n- Latest : https://naver.github.io/egjs-visible/release/latest/dist/visible.js\n- Specific version : https://naver.github.io/egjs-visible/release/[VERSION]/dist/visible.js\n\n### For production (Compressed)\n\nYou can download the compressed files for production\n\n- Latest : https://naver.github.io/egjs-visible/release/latest/dist/visible.min.js\n- Specific version : https://naver.github.io/egjs-visible/release/[VERSION]/dist/visible.min.js\n\n### Packaged version (with Dependencies)\n\u003e Packaged version is not an official distribution.\n\u003e Is just to provide for ease use of 'egjs-visible' with dependency.\n\n - **Latest**\n    - https://naver.github.io/egjs-visible/release/latest/dist/visible.pkgd.js\n    - https://naver.github.io/egjs-visible/release/latest/dist/visible.pkgd.min.js\n\n - **Specific version**\n    - https://naver.github.io/egjs-visible/release/[VERSION]/dist/visible.pkgd.js\n    - https://naver.github.io/egjs-visible/release/[VERSION]/dist/visible.pkgd.min.js\n\n### Installation with npm\n\nThe following command shows how to install egjs-visible using npm.\n\n```bash\n$ npm install @egjs/visible\n```\n\n## How to use\nSet up your HTML\n```html\n\u003cul id=\"contents\"\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest1\u003c/div\u003e\n  \u003c/li\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest2\u003c/div\u003e\n  \u003c/li\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest3\u003c/div\u003e\n  \u003c/li\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest4\u003c/div\u003e\n  \u003c/li\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest5\u003c/div\u003e\n  \u003c/li\u003e\n  \u003cli class=\"check_visible\"\u003e\n    \u003cdiv\u003etest6\u003c/div\u003e\n  \u003c/li\u003e\n\u003c/ul\u003e\n```\n```js\n// \u003cscript src=\"//naver.github.io/egjs-visible/release/latest/dist/visible.pkgd.min.js\"\u003e\u003c/script\u003e\nimport Visible from \"@egjs/visible\";\n\n// Create eg.Visible instance\nvar visible = new eg.Visible(document,{\n    // You can find targets through the targetSelector or targetClass option.\n    targetSelector : \".check_visible\",\n    // or targetClass: \"check_visible\",\n    expandSize : 0\n});\n\n// Add change event handler\nvisible.on(\"change\", function (e) {\n    // e.visible;\n    // e.invisible;\n});\n\n// Call \"check\" method whenever you want to check visibility change of the elements compared with last time you call \"check\" method.\n// When you call \"check\" mehtod and if there is a change, \"change\" event will trigger.\nvisible.check();\n```\n## Supported Browsers\nThe following are the supported browsers.\n\n|Internet Explorer|Chrome|Firefox|Safari|iOS|Android|\n|---|---|---|---|---|---|\n|8+|Latest|Latest|Latest|7+|2.1+(except 3.x)|\n\n## Dependency\n\negjs-visible has the dependencies for the following libraries:\n\n|[egjs-component](http://github.com/naver/egjs/egjs-component)|\n|----|\n|2.0.0+|\n\n\n## How to start developing egjs-visible?\n\nFor anyone interested to develop egjs-visible, follow the instructions below.\n\n### Development Environment\n\n#### 1. Clone the repository\n\nClone the egjs-visible repository and install the dependency modules.\n\n```bash\n# Clone the repository.\n$ git clone https://github.com/naver/egjs-visible.git\n```\n\n#### 2. Install dependencies\n`npm` is supported.\n\n```\n# Install the dependency modules.\n$ npm install\n```\n\n#### 3. Build\n\nUse npm script to build eg.Visible\n\n```bash\n# Run webpack-dev-server for development\n$ npm start\n\n# Build\n$ npm run build\n\n# Generate jsdoc\n$ npm run jsdoc\n```\n\nTwo folders will be created after complete build is completed.\n\n- **dist** folder: Includes the **visible.js** and **visible.min.js** files.\n- **doc** folder: Includes API documentation. The home page for the documentation is **doc/index.html**.\n\n### Linting\n\nTo keep the same code style, we adopted [ESLint](http://eslint.org/) to maintain our code quality. The [rules](https://github.com/naver/eslint-config-naver/tree/master/rules) are modified version based on [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript).\nSetup your editor for check or run below command for linting.\n\n```bash\n$ npm run lint\n```\n\n### Test\n\nOnce you created a branch and done with development, you must perform a test running `npm run test` command before you push code to a remote repository.\n\n```bash\n$ npm run test\n```\nRunning a `npm run test` command will start [Mocha](https://mochajs.org/) tests via [Karma-runner](https://karma-runner.github.io/).\n\n\n## Bug Report\n\nIf you find a bug, please report it to us using the [Issues](https://github.com/naver/egjs-visible/issues) page on GitHub.\n\n\n## License\negjs-visible is released under the [MIT license](http://naver.github.io/egjs/license.txt).\n\n\n```\nCopyright (c) 2015 NAVER Corp.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fegjs-visible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaver%2Fegjs-visible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaver%2Fegjs-visible/lists"}