public
Description: PURE Unobtrusive Rendering Engine for HTML
Home | Edit | New

jQuery.render

This is the basic rendering method of PURE.

$( target ).render( context, directives [, html ] )

Parameters:






context

Object
This is the JSON data we want to render on


directives

Object
These are the commands to tell PURE how to link the JSON data and the HTML.
See more information about directive at What is a directive ?


html (optional)

DOM/jQuery
This is the HTML template we want to transform with the data.
If not provided, the $(target) will be used as the html to be transformed.

Output:


jQuery

This method replaces $(target) with the result of the transformation.
And returns the replaced jQuery object.

Help needed

If anyone knows a jQuery way to replace a node and return the new node object that would be great (replaceWith returns the old object)

Last edited by scottymac, Fri Sep 18 06:57:18 -0700 2009
Home | Edit | New
Versions: