JavaScript Mobile First framework

Create for mobile, extend to desktop.
Get started

Advantages

Light and fast mobile website

Moff is designed for mobile first websites. You can make website light and fast on loading with the Moff CLI . No extra parts of markup, stylesheets and scripts loaded for mobile devices. They can be automatically loaded on adjusted screen sizes, e.g. tablet or desktop.

Fully featured desktop website

Moff can load all parts of markup needed on desktop screen through Data Events . Apply any features for them by loading its scripts and styles as AMD modules . These tools of the framework make your website like it was designed for the desktop.

Moff Command Line Utility

Moff CLI optimizes you page by concatenation and minification of CSS and JS files. Generated files are renamed by MD5 hash. CSS and JS files are replaced by generated ones on the page. Also it puts critical path CSS and asynchronously loads CSS files. And as a last step it minifies HTML and inlined JS and CSS.

Features

Modular system

Moff modular system allows you to create classes with its own DOM scope and rich event system. It also has API which allows you to get, create, remove and do other operations with them.

AMD

Moff provides AMD way to work with modules. They can load any css, js files and their dependency. Also it could be loaded automatically depended on screen size.

Event system

Moff event system is a part of modular system. It complements modules with very flexible way to create, trigger, assign and remove events.

Data events

Moff Data events are powerful html data attributes. They allow to load content on certain event with minimum efforts. It is possible to set loading target, cache loaded content and show on certain screen size and other more.