2 ms·
Super dumb question coming up. What is this?: <script type="text/html" id="subtitles-tmpl"> <%each sub in subtitles %> <% if ( sub.text )
by kenjackson 15y ago
Super dumb question coming up. What is this?:
<script type="text/html" id="subtitles-tmpl">
<%each sub in subtitles %>
<% if ( sub.text ) { %>
<li data-time="<%= sub.start_time %>">
<span class="time"><%= Math.floor(Math.round(sub.start_time) / 60) %>:<%= pad( Math.round(sub.start_time) % 60 ) %></span>
I haven't seen this type of script templating before? Is this just standard? Part of jQuery? Part of something else.
- vindvaki 15y agoLooks like micro templating; see http://ejohn.org/blog/javascript-micro-templating/ http://ejohn.org/blog/javascript-micro-templating/
- kenjackson 15y agoThanks to both responders. July 2008 -- I'm only three years behind the times. Catching up. :-)
- mrkurt 15y agoLooks like this: http://ejohn.org/blog/javascript-micro-templating/ http://ejohn.org/blog/javascript-micro-templating/