Created
June 13, 2011 06:46
-
-
Save yoko/1022395 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.tmpl.tag['script'] = { | |
open : "if('$2'){__.push('<script $2></script>');}else{__.push('<script>');}", | |
close: "__.push('</script>');" | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="template-script-test" type="text/x-jquery-tmpl"> | |
{{script}}console.log(1 + 1);{{/script}} | |
{{script(src="foo.js")}} | |
{{script(src="foo.js" charset="utf-8")}} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment