ovidiuch / dragdealer

Drag-based vanilla JS component
http://ovidiuch.github.io/dragdealer
MIT License
1.05k stars 149 forks source link

Add examples #108

Closed catalinmiron closed 9 years ago

catalinmiron commented 9 years ago

Fixed: #107

Because many people have complained about the lack of documentation for adding the examples from the demo in their project, so I thought that adding an examples folder for each demo section/slide will help.

@skidding please review my changes.

ovidiuch commented 9 years ago

Cool! :)

If you want to keep the examples to the minimum, with just the required dependencies, remove these from all examples: https://github.com/catalinmiron/dragdealer/blob/d90d1c745f07476c746752e4af627c190e31f4e7/examples/canvas-mask/index.html#L6-L12 — They're only used for the demo page itself.

Also, a few styles were omitted compared to the demo page:

catalinmiron commented 9 years ago

If you want to keep the examples to the minimum, with just the required dependencies, remove these from all examples: https://github.com/catalinmiron/dragdealer/blob/d90d1c745f07476c746752e4af627c190e31f4e7/examples/canvas-mask/index.html#L6-L12 — They're only used for the demo page itself.

I removed jquery.simulate since is not used anywhere, but all examples are jquery depend because we're initializing new DragDealer instance when document.ready in script.js and canvas-mask/carousel/slide-to-unlock are usign $ class selectors.

Check the output:

image image image image image image image

ovidiuch commented 9 years ago

:bow: