kippt/kippt-button — pull request #1 by chitsaou (2012-08-07 18:28:20+00:00)
Title: Remove jquery (mostly)

Hi,

I tried to remove jQuery calls, well, most of them.

The only one I don't know how to implement natively is the `$(function(){});` call, which means **invoke this function when DOM is ready**.

As far as I know, [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/DOM/DOM_event_reference/DOMContentLoaded) is equivalent to the jQuery-supported `ready` event. I tried to hook a callback with `document.addEventListener("DOMContentLoaded", function...);`, but the callback function does not execute.

If use `load` event instead, then the callback does execute, but it will wait until **all** the resources loaded, including images, which means the kippt button won't be rendered until the large files are all loaded.

So I need someone to continue this work, and maybe finally we can remove the cash.

I've tested with Chrome 21, Firefox 14, IE 9 and IE 8.

---

I tried to do this because I recently tuned some webpages by replacing many jQuery calls with native DOM APIs.