I want to integrate the tweet button inside a jquery template. I'll try the "tweet button with javascript" button ( link ). But my html template shows only the link, it does not show the button. I tried binding the tag outside of the jquery-templ script. Then it works fine. I am confused why this does not work inside jquery-tmpl.
The code is as follows:
<script type="text/x-jquery-tmpl"> <a href="https://twitter.com/share" class="twitter-share-button" data-via="twitterapi" data-lang="en">Tweet</a> </script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s) [0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Any suggestions?
Since the closing tag is </script>not correctly parsed by the browser.
</script>
Instead, you can write </scr{{= ""}}ipt>...
</scr{{= ""}}ipt>
, <script>, , </script>, script. </script> script.
<script>
, script, {{= ""}}, . </scr{{= ""}}ipt> </script> .
{{= ""}}