Download presentation
Presentation is loading. Please wait.
1
Fritz Onion Co-Founder, Pluralsight
jQuery Templates Fritz Onion Co-Founder, Pluralsight
2
About Fritz Onion Co-founder and Editor-in-Chief of Pluralsight
Developer training company specializing in Microsoft technologies Pluralsight On-Demand! - subscription library: Pluralsight twitter feed: Community contributions Author of Essential ASP.NET books, MSDN articles Conference / user group speaker (PDC, TechEd, VSLive!, DevWeek, …) Microsoft MVP for ASP.NET Contact info Blog: Twitter:
3
jQuery Templates jQuery Templates are a client-side templating mechanism Built by the ASP.NET Ajax team after they abandoned their internal efforts Currently in beta – release 1.0 expected later this year Downloadable beta available at GitHub repo at
4
Template syntax <script id="movieTemplate" type="text/x-jquery-tmpl"> <li><b>${Name}</b> (${ReleaseYear})</li> </script> <script type="text/javascript"> var movies = [ { Name: "The Red Violin", ReleaseYear: "1998" }, { Name: "Eyes Wide Shut", ReleaseYear: "1999" }, { Name: "The Inheritance", ReleaseYear: "1976" } ]; // Render the template with the movies data and insert // the rendered HTML under the "movieList" element $("#movieTemplate").tmpl(movies) .appendTo("#movieList"); <ul id="movieList"></ul>
5
Template Tags Template tags are valid within a jQuery template ${}
${{if}} ${{/if}} ${{else}} {{each}} {{/each}} {{html}} {{tmpl}} {{wrap}}
6
© 2011 Microsoft Corporation. All rights reserved
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.