{"id":18564347,"url":"https://github.com/heyman/jquery-draggable-touch","last_synced_at":"2025-04-10T04:31:47.597Z","repository":{"id":6806691,"uuid":"8054557","full_name":"heyman/jquery-draggable-touch","owner":"heyman","description":"Make HTML elements draggable using touch events","archived":false,"fork":false,"pushed_at":"2021-11-13T12:56:57.000Z","size":16,"stargazers_count":42,"open_issues_count":5,"forks_count":15,"subscribers_count":5,"default_branch":"master","last_synced_at":"2023-04-13T15:37:14.896Z","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/heyman.png","metadata":{"files":{"readme":"README.rst","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":"2013-02-06T16:02:14.000Z","updated_at":"2022-05-01T20:45:06.000Z","dependencies_parsed_at":"2022-09-12T23:02:13.173Z","dependency_job_id":null,"html_url":"https://github.com/heyman/jquery-draggable-touch","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyman%2Fjquery-draggable-touch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyman%2Fjquery-draggable-touch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyman%2Fjquery-draggable-touch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heyman%2Fjquery-draggable-touch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heyman","download_url":"https://codeload.github.com/heyman/jquery-draggable-touch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223424341,"owners_count":17142744,"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-11-06T22:14:54.823Z","updated_at":"2024-11-06T22:14:54.940Z","avatar_url":"https://github.com/heyman.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"jQuery Draggable Touch\n======================\n\nMake HTML elements draggable, and supports multi touch. Main implementation uses \ntouch events, but the plugin also has a fallback that uses mouse events.\n\nThe main reason that this plugin exist is that there are currently no \ngood jQuery plugin for making elements draggable, that has touch devices \nas it's main target (at least that I know of). `jQuery UI \u003chttp://jqueryui.com/draggable/\u003e`_ \nhas a draggable plugin which, together with `jQuery UI Touch Punch \u003chttp://touchpunch.furf.com/\u003e`_, \ncan be used to make elements draggable on touch devices. However, due to \nTouch Punch generating fake mouse events, and jQuery UI's draggable plugin, using these fake \nmouse events when dragging elements, it's error prone and contains weird bugs.\n\nI decided it was simpler to just write a draggable plugin whose main target \nwas touch devices, and that uses touch events (even though it still has a \nfallback on mouseevents when the browser/device doesn't support touch events).\n\nFeatures\n--------\n\n* Main target is touch devices\n* Small and simple\n* Supports dragging multiple elements at the same time\n\n\nUsage example\n-------------\n\n::\n\n    $(\".my-draggables\")\n        .draggableTouch()\n        .bind(\"dragstart\", function(event, pos) {\n            console.log(\"drag started on:\", this, \"at position:\", pos);\n        })\n        .bind(\"dragend\", function(event, pos) {\n            console.log(\"drag ended on:\", this, \"at position:\", pos);\n        });\n\nSet the position using :code:`transform` CSS property instead of :code:`left` and :code:`top`::\n\n    $(\".my-draggables\").draggableTouch({useTransform:true});\n\nTo disable dragability::\n\n    $(\".my-draggables\").draggableTouch(\"disable\");\n\n\nSee example\n-----------\n\n`Here \u003chttps://heyman.github.io/jquery-draggable-touch/example.html\u003e`_ is a super simple\n- and frankly quite ugly - example page.\n\n\nCopyright \u0026 License\n-------------------\n\nThis plugin is written by `Jonatan Heyman \u003chttp://heyman.info\u003e`_ and is licenced as \n`Beerware \u003chttp://en.wikipedia.org/wiki/Beerware\u003e`_.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyman%2Fjquery-draggable-touch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheyman%2Fjquery-draggable-touch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheyman%2Fjquery-draggable-touch/lists"}