Skip to content

Releases

Apply special style if image dependencies failed to load

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 27 Jul 20:08

Added functionality

  • to apply special style for miracle if one of image dependencies failed to load use data-m-error-style=".className". Where .className may be any class from your stylesheets. Note dot before class name.

In future there will functionality to choose which types of images dependencies should case error. For example, border-image may be not so important as <img /> to cause miracle restyling in failed to load case.

Also:

From this release Miracle plugin will support semantic versioning.

Handle dynamically added miracles. Await custom show effect end.

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 16 Jun 20:15

Added functionality

  • Now Miracle can efficiently handle dynamically added miracles.
  • One miracle can await when another miracle's custom show effect ended. How-to trick. Previously only built-in effects were handled.

Changed

  • Now built-in effect «scale» scales from initial value «0». Was «0.3». Honestly, I don't know why.

Custom effects with your CSS classes. Also plugin defaults changed (internals).

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 13 May 18:24

Added functionality

  • Now you can use CSS classes from your own stylesheets to create custom show effects. Check out Readme about benefits it gives.

Changed

Plugin defaults changed to minimize your confuse about hidden default styles of miracle.

Before:

All miracles (elements with class miracle) were initially hidden using opacity: 0.

From 1.0.6:

Only some miracles that use built-in show effects initially hidden using opacity: 0. If you declare custom effect then you need to take care about both initial and final states styles completely yourself.

Dealing with weren't loaded images

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 06 May 19:24

Added

If one of miracle's image dependencies was not loaded

To not interrupt overall miracles effects order on page, Miracle'll simulate load event for this image, continue to await other image dependencies and finally show miracle. So miracle element will be shown but with gap on wasn't loaded image's place and will look according to your design without this image. Also plugin throws error in console to notify about this case.

«Image dependency was not loaded» example

Fixed #2

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 26 Apr 16:31

No new functionality added or API changes in this version

Fixed

  • Fixed issue #2 — wrong «ease-x» prefixed declarations

Install via Bower

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 17 Apr 09:10

No new functionality added or API changes in this version

Changed

Internals:

  • Miracle js dependencies moved to Bower.

Added

bower install miracle

Custom spinner style, image dependencies support extended, data-m-await-trigger JS API changed

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 14 Apr 22:40

Functionality added

Changed

API:

  • $('#some-id').trigger('m-ready'); → $('#some-id').trigger('m-show');

Internals:

  • new css images parsing method M.parseImgUrls
  • from now code will be minified with mangling

Fixed

Fixed #1 — Plugin doesn't wait when images dependencies are loaded on v1.0.1

data-m-await-trigger & deferred events

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 06 Apr 11:46

Trigger miracle show programmatically:
https://github.com/MaximDubrovin/miracle#data-m-await-trigger--true

Now Miracle uses events based on $.Deferred(). Bye bye setInterval.

Let's go

Choose a tag to compare

@MaximDubrovin MaximDubrovin released this 05 Apr 18:01
v1.0.0

upd