JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
jquery.domByJSON.html
jquery.domByJSON.js

README.md

jquery.domByJSON

jquery.domByJSON is jquery plugin for creating DOM by writing JSON.

like this

Usage

 $('body').domByJSON([
     {
         div:{
	             id: 'firstDiv',
             childNodes: [
                 {
                     div: {
                         id: 'first-firstDiv'
                     }
                 }, {
                     h1: 'this is a useful plugin'
                 }
             ]
         }
     },
     {
         div:{
             id: 'secondDiv',
             childNodes: [
                 {
                     h2: {
                         childNodes: [
                             "usage",
                             {
                                 p: "$('body').domByJSON()"
                             }
                         ]
                     }
                 }
             ]
         }
     }
 ]);