From 54b465503d2f80234dfcd22e5dd4fe6e30698229 Mon Sep 17 00:00:00 2001 From: Ian Lai Date: Tue, 14 Apr 2015 20:14:16 +0800 Subject: [PATCH 1/5] Updated jQuery version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 6f713e2..4e938b2 100644 --- a/bower.json +++ b/bower.json @@ -28,6 +28,6 @@ ], "dependencies": { "animate.css": "~3.2.5", - "jquery": "~2.1.1" + "jquery": "~2.1.3" } } From 2d9afc4f0914d648762a299bbbc632e1e314bfbe Mon Sep 17 00:00:00 2001 From: Ian Lai Date: Tue, 14 Apr 2015 20:14:34 +0800 Subject: [PATCH 2/5] Updated jQuery and added demo for option --- index.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 0f6a180..c5b2b83 100644 --- a/index.html +++ b/index.html @@ -21,13 +21,17 @@ ...child object rotator. - + From e46d206a7703a1dc066898af8f777bf462ed8cd4 Mon Sep 17 00:00:00 2001 From: Ian Lai Date: Tue, 14 Apr 2015 20:34:43 +0800 Subject: [PATCH 3/5] Updated README.md --- README.md | 56 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 2f674f4..82bad8f 100644 --- a/README.md +++ b/README.md @@ -28,18 +28,22 @@ Usage 3. Encapsulate your rotating objects (children, e.g. list item) in an element (parent, e.g. unordered list): - I am a... -
    -
  • So Simple
  • -
  • Very Doge
  • -
  • Much Wow
  • -
  • Such Cool
  • -
- ...child object rotator. + ```html + I am a... +
    +
  • So Simple
  • +
  • Very Doge
  • +
  • Much Wow
  • +
  • Such Cool
  • +
+ ...child object rotator. + ``` 4. Trigger the plugin by calling Morphist() on the element (parent) containing the rotating objects (children): - $("#js-rotating").Morphist(); + ```js + $("#js-rotating").Morphist(); + ``` A demo titled `index.html` is included in this repository. Open it to see the end-result. @@ -54,21 +58,29 @@ Option | Type | Default | Description animateIn | `string` | `bounceIn` | The entrance animation type (In). animateOut | `string` | `rollOut` | The exit animation type (Out). Refer to [Animate.css][animatecss] for a list of available animations. speed | `int` | `2000` | The delay between the changing of each object in milliseconds. +complete | `object Function` | `null` | A callback that is executed after an item is animated in. They may be used like so: - $("#js-rotating").Morphist({ - animateIn: "fadeIn", // Overrides default "bounceIn" - animateOut: "zoomOut", // Overrides default "rollOut" - speed: 3000 // Overrides default 2000 - }); +```js +$("#js-rotating").Morphist({ + animateIn: "fadeIn", // Overrides default "bounceIn" + animateOut: "zoomOut", // Overrides default "rollOut" + speed: 3000, // Overrides default 2000 + complete: function () { + // Overrides default empty function + } +}); +``` The plugin relies heavily on [Animate.css][animatecss] for its [smooth, high performance animations](http://www.html5rocks.com/en/tutorials/speed/high-performance-animations/) to transition between each object. Thus, the default animation speed (different from the interval between each object as described above) may be altered via CSS: - #yourElement, .yourClass { - /* Overrides Animate.css 1s duration */ - -vendor-animation-duration: 3s; - } +```css +#yourElement, .yourClass { + /* Overrides Animate.css 1s duration */ + -vendor-animation-duration: 3s; +} +``` "Issues" @@ -92,9 +104,9 @@ License Morphist is licensed under the MIT license [(http://ian.mit-license.org/)](http://ian.mit-license.org/). [website]: http://morphist.fyianlai.com/ - [twitter]: //www.twitter.com/MrSaints - [downloads]: //github.com/MrSaints/Morphist/releases - + [twitter]: https://www.twitter.com/MrSaints + [downloads]: https://github.com/MrSaints/Morphist/releases + [bower]: http://bower.io/ - [jquery]: //www.jquery.com/ + [jquery]: https://www.jquery.com/ [animatecss]: //daneden.github.io/animate.css/ From 51300cb18078cb02bbe8df83fbff3bc25a8fcc58 Mon Sep 17 00:00:00 2001 From: Ian Lai Date: Mon, 28 Mar 2016 01:49:01 +0100 Subject: [PATCH 4/5] Update dependencies --- bower.json | 6 +++--- index.html | 2 +- package.json | 7 ++++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bower.json b/bower.json index 4e938b2..f3b395c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "Morphist", - "version": "2.1.2", + "version": "3.0.0", "description": "A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.", "authors": [ "Ian Lai " @@ -27,7 +27,7 @@ "tests" ], "dependencies": { - "animate.css": "~3.2.5", - "jquery": "~2.1.3" + "animate.css": "~3.5.1", + "jquery": "~2.1.4" } } diff --git a/index.html b/index.html index c5b2b83..8ceebc9 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ ...child object rotator. - +