Demo page

Fixes #3.

It also includes the changes in #1, diffs will go away when we merge #1.

![demo1](https://cloud.githubusercontent.com/assets/643127/3298408/4c1164a2-f601-11e3-8051-0dfbbca1965b.png)
![demo2](https://cloud.githubusercontent.com/assets/643127/3298409/4c11794c-f601-11e3-865e-5a42bdf55fd4.png)


cc @skidding @NiGhTTraX 


I felt it would relay the idea of "that is the exact DOM node". We can go
with outerHTML but won't it get too big? Wdyt?


On Wed, Jun 18, 2014 at 10:38 AM, Andrei Picus <notifications@github.com>
wrote:

> In js/demo.js:
>
> > @@ -0,0 +1,32 @@
> > +function printToBox(message) {
> > +    var p = $("<p></p>");
> > +    p.text(message);
> > +    $("#message-box").append(p);
> > +}
> > +
> > +window.onload = function () {
> > +    var observer = new DOMObserver($("#test-div")[0], {
> > +        addedNodeHandler: function (addedNode, m) {
> > +            printToBox("Added node: " + addedNode);
>
> String concatenation with a DOM node? :)
>
> [image: image]
> <https://cloud.githubusercontent.com/assets/485061/3311319/fb4eca92-f6c2-11e3-866b-b4ab43d3b79b.png>
>
> Maybe use .outerHTML? Or go wild with
> $(addedNode).clone().empty()[0].outerHTML :P
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/uberVU/dom-observer/pull/8/files#r13904574>.
>



-- 

[image: hootsuite] <http://hootsuite.com>

*Mihnea Dobrescu-Balaur*
Software Engineer | Hootsuite <http://www.hootsuite.com>
@mihneadb <http://twitter.com/mihneadb>
We are hiring in a *big* way! Apply now <http://hootsuite.com/careers>