Skip to content
Hans Lindetorp edited this page Apr 26, 2021 · 1 revision

iMusic can be connected to user events using HTML-data-attributes. This makes it possible to control iMusic playback without writing a single line of javascript.

<!doctype html>
<html>
  <head></head>
  <body>
    <button data-imusic-play="A">Loop A</button>
    <button data-imusic-play="B">Loop B</button>
    <button data-imusic="stop">STOP</button>
  </body>
</html>
Clone this wiki locally