Loading Lifecycle
Learn how TwicPics handles medias loading lifecycle.
The Script happens to tag elements with specific classes whenever images are loaded under the hood. This is especially useful if you want to apply a specific CSS effect to images that are being loaded (like a fade-out/fade-in animation) or if you wish to visually highlight errors during development (like coloring problematic elements in red).
Here are the classes the Script will mark elements with:
twic-loading
when animg
orvideo
source is being loadedtwic-done
when animg
orvideo
source has been loadedtwic-error
when an error occurred while loading animg
orvideo
sourcetwic-poster-loading
when avideo
poster is being loadedtwic-poster-done
when avideo
poster has been loadedtwic-poster-error
when an error occurred while loading avideo
postertwic-background-loading
when at least one of the background images of an element is being loadedtwic-background-done
when all background images of an element have been loadedtwic-background-error
when an error occurred while loading one of the background images