{"id":16845687,"url":"https://github.com/othree/jquery.rtl-scroll-type","last_synced_at":"2025-04-11T06:29:23.657Z","repository":{"id":4703350,"uuid":"5850741","full_name":"othree/jquery.rtl-scroll-type","owner":"othree","description":"Detect scrollLeft type under RTL language","archived":false,"fork":false,"pushed_at":"2020-02-24T09:08:44.000Z","size":27,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T06:46:12.556Z","etag":null,"topics":["jquery","jquery-plugin","rtl","scrollleft"],"latest_commit_sha":null,"homepage":null,"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/othree.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}},"created_at":"2012-09-18T03:07:12.000Z","updated_at":"2023-06-24T10:57:31.000Z","dependencies_parsed_at":"2022-08-24T11:20:42.089Z","dependency_job_id":null,"html_url":"https://github.com/othree/jquery.rtl-scroll-type","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othree%2Fjquery.rtl-scroll-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othree%2Fjquery.rtl-scroll-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othree%2Fjquery.rtl-scroll-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/othree%2Fjquery.rtl-scroll-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/othree","download_url":"https://codeload.github.com/othree/jquery.rtl-scroll-type/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248354497,"owners_count":21089830,"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","rtl","scrollleft"],"created_at":"2024-10-13T12:59:38.990Z","updated_at":"2025-04-11T06:29:23.629Z","avatar_url":"https://github.com/othree.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jQuery RTL Scroll Type Detector\n\nHorizontal scrollbar with RTL(right to left) language support has different\nimplementations in different browsers.\n\n[scrollLeft][mdn-scrollleft] in RTL element is \u003cdel\u003enot defined by any spec or\nstandards\u003c/del\u003e. So different browsers have different implementations. As far as I\nknow, there are three implements: Chrome(Blink), Firefox/Safari, IE.\n\nChrome's RTL scrollbar is the same as LTR(left to right) element. Except for\nthe initial position of the scrollbar controller is at the most right position.\n\nFirefox has a clear definition in its MDN document. The most right position\nstands for 0. And when the user scrolls to the left. The value decreases. The\nvalue is possible to be negative in this implement.\n\nIE thought the element is flip horizontal. So the most right position is 0.\nAnd if it scrolls to the left. Value increases.\n\nA table is below to show these types more clear.\n\nThis plugin is designed to detect which type is the browser is using. Assign\nthe result to jQuery's support object named **rtlScrollType**. You will need\nthe scrollWidth of the element to transform between these three types of value.\n\n[mdn-scrollleft]: https://developer.mozilla.org/en-US/docs/DOM/element.scrollLeft\n\n## 3 Types of scrollLeft (scrollWidth = 100)\n\n\u003ctable\u003e\n\u003cthead\u003e\n\u003ctr\u003e\n  \u003cth\u003eBrowser\u003c/th\u003e\n  \u003cth\u003eType\u003c/th\u003e\n  \u003cth\u003eMost Left\u003c/th\u003e\n  \u003cth\u003eMost Right\u003c/th\u003e\n  \u003cth\u003eInitial\u003c/th\u003e\n\u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n  \u003ctd\u003eChrome/Opera(Blink)/Edge(Blink)/IE6\u003c/td\u003e\n  \u003ctd\u003edefault\u003c/td\u003e\n  \u003ctd\u003e0\u003c/td\u003e\n  \u003ctd\u003e100\u003c/td\u003e\n  \u003ctd\u003e100\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003e\u003ca href=\"https://drafts.csswg.org/cssom-view/#dom-window-scroll\"\u003eStandard\u003c/a\u003e/Firefox/Safari/Opera(Presto)\u003c/td\u003e\n  \u003ctd\u003enegative\u003c/td\u003e\n  \u003ctd\u003e-100\u003c/td\u003e\n  \u003ctd\u003e0\u003c/td\u003e\n  \u003ctd\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n  \u003ctd\u003eIE8 and later\u003c/td\u003e\n  \u003ctd\u003ereverse\u003c/td\u003e\n  \u003ctd\u003e100\u003c/td\u003e\n  \u003ctd\u003e0\u003c/td\u003e\n  \u003ctd\u003e0\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctbody\u003e\n\u003c/table\u003e\n\n## Usage\n\nSee [demo][].\n\n[demo]: https://github.com/othree/jquery.rtl-scroll-type/blob/master/demo/look.html\n\n## Web Standard\n\nIt's defined in [CSSOM View Module][cssomvm]. The **negative** type is the\nchosen one. Chrome has a [plan][chplan] to change its behavior. More\ninformation is at [#6][].\n\n[cssomvm]: https://drafts.csswg.org/cssom-view/\n[chplan]: https://www.chromestatus.com/feature/5759578031521792\n[#6]: https://github.com/othree/jquery.rtl-scroll-type/issues/6\n\n## License\n\nCopyright (c) 2012 Wei-Ko Kao\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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fothree%2Fjquery.rtl-scroll-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fothree%2Fjquery.rtl-scroll-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fothree%2Fjquery.rtl-scroll-type/lists"}