A Simple Example of fastFrag.js

Create a nested div, p, and a link to the fastFrag Repo

// sample code
var structure = {
    css : "my_div_classname",
    content : {
        type : "p",
        id : "an_html_id",
        content : {
            type : 'a',
            attributes : {
                href : 'http://github.com/gregory80/fastFrag'
            },
            content : "fastFrag Repo"            
        }
    }
}

var fast_doc_frag = fastFrag.create( structure ); // transform from JSON to Dom Fragment
document.getElementById('middle').appendChild( fast_doc_frag );