Closed 7PH closed 2 years ago
This would mean publishing a v2.0.0
of the library, including also these changes:
hover-triggered
and hover-once
play modes into hover
. (Remove hover-once
for now. If implemented in the future, should be done in a separate option once: boolean
)click
play mode to trigger glitch on clickPowerGlitch.glitch(..)
This would require a rewrite of the top-level
animateDiv
/glitch
functionsSuggested changes:
API
imageUrl
option, replace withhtml
of typestring | undefined
html
is given, this will be used as the glitched content. Otherwise, the innerHTML property of the element will be usedCode changes for
PowerGlitch.glitch(element, options)
element
element
with relative positioningelement
will be put as first child ofcontainer
using absolute positioning (will be used to keep app event listener, if any)Intuitively, it should work at least for simple UI elements (images, buttons, paragraphs)