Skip to content
This repository has been archived by the owner on Sep 21, 2023. It is now read-only.

frkr/140medley

 
 

Repository files navigation

140medley Build Status

This is a micro-framework or a collection of small, helpful utilities for common javascript tasks.

Download

Size

  • Source: 5147 bytes.
  • Minified: 825 bytes
  • Compressed: 241 bytes.
  • see original

Features

  • Bind/Unbind events - b();
  • DOM selector - d();
  • Get cross-browser xhr - j();
  • Create DOM elements - m();
  • Local storage - s();
  • Templating - t();

Usage

Bind event

  • a DOM Element
  • b Event name
var el = document.getElementById('container');
b(el, 'click', function(e) {
	console.log('clicked');
});

More

DOM selector

d('div');
d('#name');
d('.name');

More

Get cross browser xhr object

a = j();

More

Create DOM element

var el = m('<h1>Hello</h1>');
document.body.appendChild(el);

More

LocalStorage

s(placeholder,JSON);

More

Templating

var hello = t("Hello, #{this.name || 'world'}!")

console.log( // => "Hello, Jed!"
	hello({name: "Jed"})
)

More



Inspired by 140bytes.

About

This is a micro-framework or a collection of small, helpful utilities for common javascript tasks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 90.3%
  • CSS 7.4%
  • CoffeeScript 2.3%