I have some javascript in a template and when I try to use template variables inside the ... tags, the template variables are not parsing.
All other template vars on the page are parsing as expected.
I also have $config['protect_javascript'] set to "n"
Code in template:
<script type="text/javascript">
$('#{pricing_button}{pricing_button_attr_id}{/pricing_button}').on('click', function (e) {
e.preventDefault();
alert('clicked it!');
alert('{ga_event}');
});
</script>
The rendered page results:
<script type="text/javascript">
$('#{pricing_button}{pricing_button_attr_id}{/pricing_button}').on('click', function (e) {
e.preventDefault();
alert('clicked it!');
alert('{ga_event}');
});
</script>