Now I am using dot.js ,in the web page,I have a span call 'spanHelloword' and its value is "helloworld".I want to get the span value in dot temple,How to do that?
<script id="j-tmpl" type="text/template">
{{ if(it.success && $('#spanHelloword').text()=='helloword'){ }}
<h2>results:</h2>
<ul>
{{ for (var i = 0, l = it.data.length; i < l; i++) { }}
<li>
<h5>{{=it.data[i].title}}</h5>
<p>{{!it.data[i].message}}</p>
</li>
{{ } }}
<ul>
{{ }else{ }}
<h2>no data</h2>
{{ } }}
</script>