otterly js

small · fast · fierce

v1.7

Accessible and intuitive DOM code - localized to where it matters. Write effective Javascript - take a look!
export default {
  unitName: "MoreOtters",
  otterCount: 0,
  makeOtter: function(){
    this.el.insertAdjacentText('afterbegin', "🦦")
    this.otterCount += 1
  }
  }
<div data-unit="MoreOtters">
  <div class="btn" data-on="click->makeOtter">
    Make an Otter!
  </div>
  </div>


Make an Otter!


//Then simply access the unit, and get or run what you need!
  let otterEl = document.querySelector('[data-unit="MoreOtters"]')
  let unit = otterEl._unit
  let otters = unit.otterCount


Made to be simple but powerfull, we provide a small but strong basis for Single Page Applications, Progressive Web Apps and Ajax / Forms. Current status has Events, AJAX and SPA capabilites handled. PWA capabilites are being considered in the future, but not currently.