Repository navigation
Releases
Apply special style if image dependencies failed to load
Added functionality
- to apply special style for miracle if one of image dependencies failed to load use
data-m-error-style=".className". Where.classNamemay 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.
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).
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
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.
Fixed #2
No new functionality added or API changes in this version
Fixed
- Fixed issue #2 — wrong «ease-x» prefixed declarations
Install via Bower
No new functionality added or API changes in this version
Changed
Internals:
- Miracle js dependencies moved to Bower.
Added
- Install via Bower
bower install miracle
Custom spinner style, image dependencies support extended, data-m-await-trigger JS API changed
Functionality added
- data-m-spinner-style
- Support as image dependencies:
list-style-imageborder-image
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
Trigger miracle show programmatically:
https://github.com/MaximDubrovin/miracle#data-m-await-trigger--true
Now Miracle uses events based on $.Deferred(). Bye bye setInterval.