collapseHorizontal (options, callback)
Collapses each element in the set of matched elements horizontally, for the specified duration and to the specified target width, and optionally with a callback.
<div class="width-lg"> <div class="flex-col gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").collapseHorizontal({ duration: 3000, targetWidth: 20 }, (el) => { console.log("Transition completed for " + el.attr("id")); }); });
collapseVertical (options, callback)
Collapses each element in the set of matched elements vertically, for the specified duration and to the specified target height, and optionally with a callback.
<div class="width-xl"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").collapseVertical({ duration: 3000, targetHeight: "1rem" }, (el) => { console.log("Transition completed for " + el.attr("id")); }); });
expandHorizontal (options, callback)
Expands each element in the set of matched elements horizontally, for the specified duration and to the specified target width, and optionally with a callback.
<div class="width-lg"> <div class="flex-col gap-vertical-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").expandHorizontal({ duration: 3000, targetWidth: "20rem" }, (el) => { console.log("Transition completed for " + el.attr("id")); }); });
expandVertical (options, callback)
Expands each element in the set of matched elements vertically, for the specified duration and to the specified target height, and optionally with a callback.
<div class="width-xl"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").expandVertical({ duration: 3000, targetHeight: "20rem" }, (el) => { console.log("Transition completed for " + el.attr("id")); }); });
fadeIn (duration, initialOpacity, callback)
Eases in the opacity each element in the set of matched elements horizontally, for the specified duration and starting at the initial opacity, and optionally with a callback.
<div class="width-xl"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").fadeIn(5000, 0.1, function(el) { console.log("Transition completed for " + el.attr("id")); }); });
fadeOut (duration, finalOpacity, callback)
Eases out the opacity each element in the set of matched elements horizontally, for the specified duration and ending at the final opacity, and optionally with a callback.
<div class="width-xl"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").fadeOut(2000, 0.2, function(el) { console.log("Transition completed for " + el.attr("id")); }); });
slideHorizontal (direction, distance, duration, callback)
Moves each element in the set of matched elements left or right for the specified distance and duration, and optionally with a callback.
<div class="width-lg"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").slideHorizontal("right", 100, 3000, function(el) { console.log("Transition completed for " + el.attr("id")); }); });
slideVertical (direction, distance, duration, callback)
Moves each element in the set of matched elements up or down for the specified distance and duration, and optionally with a callback.
<div class="width-xl"> <div class="flex-row gap-sm"> <div class="container flex-auto height-sm border-sm border-dark" id="div1"></div> <div class="container flex-auto height-sm border-sm border-dark" id="div2"></div> </div> </div>
webui.ready( () => { ui(".container").slideVertical("down", 100, 3000, function(el) { console.log("Transition completed for " + el.attr("id")); }); });
animate (animateWhat, delta, propertyValue, limitValue, duration, callback)
Animates each element in the set of matched elements according the specified property and duration, and optionally with a callback.
<div id="elementToAnimate" class="width-sm height-sm background-dark place-top-left left-md top-md"> </div>
webui.ready( () => { ui("#elementToAnimate").animate("top", 1, "15rem", 5, 1000, function(el) { console.log(el[0]); ui("#elementToAnimate").animate("left", 1, "15rem", 5, 1000, function(el) { console.log(el[0]); ui("#elementToAnimate").animate("top", 0, "15rem", 5, 1000, function(el) { console.log(el[0]); ui("#elementToAnimate").animate("left", 0, "15rem", 5, 1000, function(el) { console.log(el[0]); }); }); }); }); });