Engaging in reverse engineering I found today the following snipet:
<script id="idea" type="text/x-jqote-template">
<![CDATA[
<li data-idea_id="<*= this.id *>" class="voted">
<div class="vote_panel">
<div class="vote_count"><*= this.votes_count *></div>
<span class="vote_action vote">You've already voted</span>
</div>
<div class="idea_details">
<h4 class="title"><*= this.title *> <a href='#' class='toggle_description more details'>Details</a></h4>
<div class="description_metadata_pane" style="display: none;">
<p class="description"><*= this.description *></p>
<p class="metadata">- <*= this.name *> on <*= this.created_at *></p>
</div>
</li>
]]>
</script>
Could someone explain how does this work, and where data comes from (server- or client-side)?
This seems to be a client-side template engine (I know, insane) called jQote2.
It loads the contents of the
<script>tag and uses jQuery to render it clientside.