Quick Docs & Demo

Welcome to the JS Demo. Scroll down to see this framework in action.

Github CSS Demo

morr.js use

(Chain Your Events)

morr is meant to be chained, like jQuery or similar libraries. So, most events will return itself instead of a boolean value. $(el).is('active') returns the object, not a state.


You can chain states with actions, and they will be fired accordingly. In the above example, the .is-active class will only be added if el already contains the .active

Quick Docs

Returns a new morr object, with the element passed, and available for manipulation.
Returns true if el has .name Returns true if el does NOT have .name Returns true if el does NOT have .name
Adds class name to the element. Revoes class name from the element. Toggles class name on the element. Deletes the element. Fires callback() If you need to add more complicated javascript to your chain, you can use the then method.

But wait...

Absolutely. I'm using Vue.js to build this page. It only styles basic elements, drop the CSS wherever you want. Go nuts! The javascript here is literally just a tool to add and remove classes. If you're using jQuery or something similar, you probably don't need it at all.