Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to pass the handler before and after rendering every element inside the template.
While passing, I need to send the dataitem and also an element because user can manipulate the element attributes.
Currently I am using MS Ajax template for that.

Here is my code:
XML
<td sys:codebefore="before($element,$dataItem)" sys:codeafter="after($element,$dataItem)>
</td>
<td sys:codebefore="before($element,$dataItem)" sys:codeafter="after($element,$dataItem)>{{Name}}
</td>


Here I just called 'before' and 'after' method before and after rendering the html respectively.
Arguments are $element and $dataItem and $element will refer the td element.

But in jquery templating no scope for element inside jquery.
Like the above I need equivalent in JQuery Templating.
Posted
Updated 28-Nov-10 22:05pm
v3
Comments
Dalek Dave 29-Nov-10 4:05am    
Edited for Correct Code Blocking and Grammar.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900