LoadGo v2.2
- Added a new method:
destroy
. - Added tests (more will be added in the future).
- Fix several bugs.
- LoadGo default template changed.
- Improved documentation.
- Javascript version improved.
- jQuery version improved.
Breaking changes
Since 2.2 version, LoadGo now wraps the image on a div
element, then add the overlay as the first sibling of the image following this template:
<div class="loadgo-container">
<image src="logo.png" class="..." style="..." />
<div class="loadgo-overlay" style="..." />
</div>
This change makes easy for the plugin to calculate overlay's dimension and position. Make sure that your CSS rules like div > img
are applied correctly.
For example, if you have html and CSS like these:
<style>
.image-container > img {
margin: 0 auto;
}
</style>
<div class="image-container">
<img src="logo.png" />
</div>
You should change it to this:
<style>
div > div > img {
margin: 0 auto;
}
</style>
<div class="image-container">
<img src="logo.png" />
</div>
Or even better, assign a CSS class and forget about >
:
<style>
.my-image {
margin: 0 auto;
}
</style>
<div class="image-container">
<img src="logo.png" class="my-image" />
</div>