I’m just doing this for learning purposes, It has what I would consider the essential functions - Selectors, Events, DOM, Ajax and Animation.
Honourable mentions to jQuery, prototype.js, Animator.js, Sitepoint’s Core.js, Sizzle.js


* addEvent
* removeEvent
* preventDefault
* stopPropagation
* ajax


* observe
* addClass
* hasClass
* removeClass
* computedStyle
* load
* animate
* saveAnimation
* toggleAnimation

What do you think?
Anything you would do differently?

I’m loving Anmiator.js - you can animate towards class names or a css ruleset.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="mQuery.js"></script>
<script type="text/javascript">

// onload
$(function() {

$('#dom-link').observe('click', function(event) {
	$('h1')[0].innerHTML += ' has a computed fontSize of ' + $('h1').computedStyle('fontSize');


$('#ajax-link').observe('click', function(event) {

$('#box2').saveAnimation('afterAnimate', {
$('#animate-link').observe('click', function(event) {


<style type="text/css">
#box, #box2 {
	border:1px solid black;
.beforeAnimate {
	width: 10em;
	background-color: rgb(256, 256, 256);
	font-style: normal;
.afterAnimate {
	width: 40em;
	background-color: #F39;
	font-style: italic;

.red {
	font-style: italic;
	color: red;

.blue {
	border: 1px solid blue;
	padding: 5px 10px;
<h2>Selectors, Events, DOM, Ajax and Animation</h2>
<p><strong>The Minimalist Javascript <span>Library</span></strong></p>
<hr />
<p><a href="#" id="dom-link">Do DOM magic</a></p>
<p><a href="#" id="linky"><span>linky</span> <span>linky</span></a></p>
<p><span><span><b><i id="child">up to parent</i></b></span></span></p>
<p><a href="ajax.html" id="ajax-link">Fetch!</a></p>
<div id="ajax-content"></div>
<p><a href="#" id="animate-link">Animate!</a>
<div id="box" class="beforeAnimate">Some content</div>
<div id="box2" class="beforeAnimate">Some content</div>
<hr />

Thanks JimmyP for getting me started.

Nice work Mark! Creating your own library/framework is a great way of learning JS, the DOM and all of its idiosyncrasies. Good on ya!