This is a library to show the loading progress of given assets and reveal them using various animations. Please give feedback, report bugs, and propose new loader ideas!
- Include the necessary files. Right now that means you need to include the 3 required JS files and the CSS
- Apply the
.ale
class to all elements you want to use a loading effect on. - Declare the loader type using
data-ale-type
- Declare the source(s) for the element using
data-ale-src
. For a secondary (backup) source, usedata-ale-src-backup
. - If it's a video, also declare
data-ale-is-vid=true
.
Image example:
<div class="ale" data-ale-type="diagonal" data-ale-src="/img/url.jpg">
Video example:
<div class="ale" data-ale-type="diagonal" data-ale-src="/vid/vidFile.mp4" data-ale-src-backup="/vid/backupVidFile.mpeg" data-ale-is-vid=true>
Please feel free to make and add your own effects and remove effects you're not using in your project! I'd love to hear suggestions for other loading effects. Understanding how it's made will help you if you're seeking to make your own effects.