Metro 4 Table — data-body attribute

Hello my friends! In this article I want to talk about the yet undocumented feature of the table component - attribute data-body. With this attribute you can define data for table as ARRAY. Without writting <tr><td>...</td></tr> code. First - You must define array with table data. Important! Data for table must be defined before moment... » read more

Metro 4 — Changes for animate function in 4.3.7

In 4.3.7 will be changed arguments for the animate function. Version <= 4.3.6 animate format: $(selector).animate(draw, dur, easing, callback); Version >= 4.3.7. Function animate receive one argument as plain object or array of objects. $.animate({ el: object | HTMLElement, draw: {} | function, dur: 1000, ease: "linear", loop: 0, pause: 0, dir: "normal", defer: 0,... » read more

Animate audio volume with AnimationJS

Hello, my friends! In this example, I want to show how you can animate the volume of an audio element using the AnimationJS module. Example: HTML <div class="wrapper" id="field" data-title=""> <button data-role="fadeIn">Sound fade In</button> <button data-role="fadeOut">Sound fade Out</button> <audio autoplay loop> <source src="sound.mp3" type="audio/wav"> </audio> </div> JavaScript import {animate} from "@olton/animationjs"; const audio =... » read more

Play sound on button click in Metro 4

Hello, my friends! In 4.3.7 I'm added new component AudioButton and method Metro.playSound. With method Metro.playSound, you can play any sounds on your request. var btn = document.querySelector(...); car sound = ''; btn.addEventListener('click', e => { Metro.playSound(sound, (src) => { console.log('sound '+src+' done') }) }) or, You can create button (or other element) with role... » read more