My favorites | Sign in
Project Logo
                
Search
for
Updated Feb 26, 2009 by tobiasz.cudnik
valuesToStackReplaceMethodJS  

valuesToSelectorReplace

Wiki > Syntax > valuesToStack > [MethodJS ]

Parameters

Description

Injects markup from values' content (rows or attributes) actually matched nodes.

Example

Markup

<node1>
	<node2></node2>
</node1>
<node1>
	<node2></node2>
</node1>

Data

var values = ['<foo/>', '<bar/>'];

QueryTemplates formula in JavaScript

$template.find('node1')
	.valuesToStackReplace(values)

Template

<foo></foo><bar></bar>

Template tree before

node1
 - node2
node1
 - node2

Template tree after

foo
bar

See:

Comments allowed


Sign in to add a comment
Hosted by Google Code