Skip to content

jQuery.jBuilder.build

Nemesis9765 edited this page Jun 16, 2012 · 4 revisions

Table of Contents

Description

An alias of doLayout which takes the HTML string and renders to a target.

Parameter List

Name Type Description
formData Object or Array The JSON object which builds the form and renders in a specific place

formData

The JSON object which gets passed to doLayout to turn into HTML

params

Object Parameters
Name Type Description
renderTo String or jQuery The target where you want the HTML to be rendered to. If not defined, it renders to document body.

Example Usage

Rendering Simple HTML to a div

 jQuery.jBuilder.build([{
 	type : "html",
 	renderTo : jQuery("div"),
 	text : "<p>This is a paragraph</p>"
 }]);

Rendering a Panel to the Body with Custom HTML

 jQuery.jBuilder.build({
 	layout : 'accordion',
 	width : 400,
 	items : [{
 		label : "Panel Title",
 		type : "html",
 		text : "<p>This is a paragraph</p>"
 	}]
 });