<p n="content">Hello!</p>
<button n="button">Click Me!</button>
* { font-family: Sans-Serif; }

p { font-size: 2rem; }
var count = 0;
var p = null;
Suit.controller.add({
  on: function(n) {
    switch(n.path) {
      
      //Entry Point
      case "welcome":
      p = Suit.view.get("content");
      setTimeout(function() {
        p.textContent = "You Clicked 0 times!";
      },2000);
      break;
      
      //<button n='button'> onclick event
      case "button@click": 
        count++;
        p.textContent = "You Clicked "+count+" times!";
      break;
    }
  }
});

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://rawgit.com/suitjs/core/2fde88e369cd7e465a42a4533f85e842a5e256c5/js/suit.js