Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/logvinovleon/draggable_example
https://github.com/logvinovleon/draggable_example
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/logvinovleon/draggable_example
- Owner: LogvinovLeon
- Created: 2016-02-17T10:55:13.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-17T19:01:05.000Z (almost 9 years ago)
- Last Synced: 2024-10-31T15:24:03.638Z (2 months ago)
- Language: HTML
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
You have a skeleton for a `Draggable` class. It will add a draggable behavior to a given element and to make it interesting there are some more constraints:
* Make the element draggable on both modern **desktop** and **mobile** browsers (*current version of Firefox and Chrome*)
* Add event listeners (*mouse* and *touch*) on the element to ensure that it can be dragged
* Ensure no text is selected as you drag the element
* Ensure the element always snaps to the user's mouse pointer or finger
* Apply an interesting style to the element as it's dragged
* Do **not** use function closures, global variables, or timers!
* **Bonus**: When dragging completes, make the element moves back to it's original position with a smooth, animated transition and remove the interesting style you've added wile it was draggable after the animation has completed
* **If you are getting close to the time limit** without a working result use pseudo code and comments to explain what you wanted to achieve.