Download the latest version here:

Version 1.11.0 - MIT licensed

Miq DOM library

Miq is a lightweight DOM library.

Miq is like jQuery, but with fewer functions and more modern and can therefore be only 1.4 kilobyte zipped.

Miq compared to jQuery:

You don't like the jQuery reference? Just see Miq as a shortcut for document.querySelectorAll() with a couple of attached utility functions.

Documentation

Supported functions:

$(),
.addClass(),
.append(),
.attr(),
.before(),
.clone(),
.closest(),
.css(),
.eq(),
.find(),
.first,
.hasClass(),
.html(),
.is(),
.off(),
.on(),
.parent(),
.prop(),
.remove(),
.removeAttr(),
.removeClass(),
.text(),
.val(),
$.ajax(),
$.ajaxCallback(),
$.miq
.filter(),
.forEach(),
.map(),
.slice(),
.sort(),
and all other Array functions.

See the full documentation for a description of every function/property.

Miq supports type definitions, so in a supporting editor like Visual Studio or WebStorm, you'll get auto complete and inline documentation. Download miq.d.ts.

CDN

The easiest way is to use a content delivery network. Just paste the following code in your HTML:

<script src="https://cdn.jsdelivr.net/miq/1.11.0/miq-min.js" integrity="sha384-ImUa755IQNnQYYaUo3+ruuKDnWlc7vZOwof82bWByawbfDXP3e1SDcLsdvNNPcM7" crossorigin="anonymous"></script>

Module

For a modular approach, miq supports both AMD and CommonJS.

AMD

require(['miq'], function($) {
    // your code here...
}

CommonJS

var $ = require("miq");

Package

To install the whole package, you can use one of the following commands:

git clone https://github.com/edwinm/miq.git
 
npm install miq --save-dev
 
bower install miq

Browser support

Miq works with Internet Explorer 9 and later, Chrome, Firefox, Safari 7 and later (OSX and iOS) and Opera.

Unit tests

You can run the unit tests. Let me know when you see a test fail.

Copyright

Miq is copyright 2016 Edwin Martin and released under the MIT license.

Edwin Martin <edwin@bitstorm.org>