jquery - Append text in html <script></script> tag. Javascript issue -
i want add text span container on runtime calling javascript function html node :
<span class="muted"> <script> //here want add string returned outer span. (i use jinja tags) getgenericobjname("{{n.news_type}}",{{n.news.object_id}}); </script> </span>
the reason because iterate on news feed. , know function returns correct value.
i tried use document.write(...) seems override whole page.
thanks!
do other way round, via js (using jquery):
<script type="text/javascript"> $(".muted").html(getgenericobjname("{{n.news_type}}",{{n.news.object_id}})); </script>
html:
<span class="muted"></span>
Comments
Post a Comment